pca_scoretable: Extract PCA score table

Description Usage Arguments Details Examples

View source: R/PCA.R

Description

[Experimental] Compute variance explained by a few PCA axis

Usage

1
pca_scoretable(x, naxe = 1)

Arguments

x

glPCA object

naxe

number of axis for which you want to extract PCA scores

Details

PCA from glPca. It will return a dataframe, including ID and pca.score for the desire number of axis

Examples

1
2
3
4
5
6
7
## simulate a toy dataset
x <- adegenet::glSim(50,4e3, 50, ploidy=2)
## perform PCA
pca1 <- adegenet::glPca(x, nf=3)
## Extract variance
res <- pca_scoretable(pca1, naxe=3)
head(res)

biodray/QuickPop documentation built on Dec. 19, 2021, 9:44 a.m.