indpca: PCA on a matrix of individuals genotypes frequencies

View source: R/indpca.R

indpcaR Documentation

PCA on a matrix of individuals genotypes frequencies

Description

Carry out a PCA on the centered, unscaled matrix of individual's allele frequencies.

Usage

indpca(dat,ind.labels=NULL,scale=FALSE)

## S3 method for class 'indpca'
print(x,...)
## S3 method for class 'indpca'
plot(x,eigen=FALSE,ax1=1,ax2=2,...)

Arguments

dat

A data frame with population of origin as first column, and genotypes in following columns.

ind.labels

a vector of labels for the different individuals

scale

whether to standardize each column to variance 1 or to leave it as is (default)

x

an indpca object

eigen

whether to plot in an additional windows screeplot of the inertias for the different axes

ax1

which PCA coordinates to plot on the x axis

ax2

which PCA coordinates to plot on the y axis

...

further arguments to pass to print or plot

Value

An object of class indpca with components

call

The function call

ipca

an object of class pca and dudi (see dudi.pca) in package ade4

mati

the original non centered matrice of individuals X alleles frequencies

Author(s)

Jerome Goudet jerome.goudet@unil.ch

Examples

##not run
data(gtrunchier)
x<-indpca(gtrunchier[,-2],ind.labels=gtrunchier[,2])
plot(x,col=gtrunchier[,1],cex=0.7)

hierfstat documentation built on May 6, 2022, 1:05 a.m.