thibautjombart / adegenet

adegenet: a R package for the multivariate analysis of genetic markers
169 stars 64 forks source link

How to make find.clusters accepts the principle components? #288

Closed NamLQ closed 4 years ago

NamLQ commented 4 years ago

Hi!

In some cases, I performed PCA on data and received the principal components (PCs). I would like to use PCs as an input of find.clusters() function. How could I do it?

Thanks!

thibautjombart commented 4 years ago

Hi there, you have 2 options: 1) pass the data.frame containing the PCs to find.clusters ; the function will again run a PCA on this input, but since these are already PCs, it won't change a thing 2) if you ran your PCA using ade4, use the argument dudi = your_pca_object See ?find.clusters