Skip to content

add a pca function #34

Description

@rmflight

We should just add a PCA function that does exactly what we want in terms of calculating variances, etc, and adding data back onto the sample-info data.frame if provided.

What I imagine:

  • Input is a data.frame or matrix of abundances, optional data.frame of metadata, arguments to prcomp;
  • Do PCA with provided arguments;
  • Extract scores and loadings into data.frames;
  • Calculate scores variances, and add the labels to the scores data.frame;
  • Add scores to the metadata;
  • Return a list containing:
    • full pca results;
    • scores data.frame;
    • loadings data.frame;
    • variance contributions data.frame;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions