get_pca {MicrobiotaProcess} | R Documentation

## Performs a principal components analysis

### Description

Performs a principal components analysis

### Usage

    get_pca(obj, ...)

    ## Default S3 method:
    get_pca(obj, sampleda = NULL, method = "hellinger", ...)

    ## S3 method for class 'phyloseq'
    get_pca(obj, method = "hellinger", ...)

### Arguments

`obj` | phyloseq, phyloseq class or data.frame shape of data.frame is nrow sample * ncol feature.
`...` | additional parameters, see`prcomp`.
`sampleda` | data.frame, nrow sample * ncol factors.
`method` | character, the standardization methods for community ecologists. see `decostand`.

### Value

pcasample class, contained prcomp class and sample information.

### Examples

    # don't run in examples
    #library(phyloseq)
    #data(GlobalPatterns)
    #subGlobal <- subset_samples(GlobalPatterns,
    #         SampleType %in% c("Feces", "Mock", "Ocean", "Skin"))
    #pcares <- get_pca(subGlobal, method="hellinger")
    #pcaplot <- ggordpoint(pcares, biplot=TRUE,
    #                      speciesannot=TRUE,
    #                      factorNames=c("SampleType"), ellipse=TRUE)

[Package MicrobiotaProcess version 1.0.5 Index]