[adegenet-forum] How are NA values handled by glPca ?

Guillaume Louvel yom7 at hotmail.fr
Tue Mar 18 12:33:32 CET 2014


Hi all,

I am doing a glPca on a genlight object of 627719 SNPs and 934 individuals (so I don't want to use genind and dudi.pca which are too slow and too heavy for this size).

With genind objects, it's easy to replace NA by the mean for example, using na.replace or creating it with df2genind( dataframe , missing="mean").

However, it's not possible to replace missing values in genlight objects, because it is binary encoded, and the function glPca does not complaint about missing values (not like dudi.pca).

So, the question is, what does glPca with missing values ? Because this function is part of the adegenet package whereas dudi.pca comes from ade4, is the replacement of NA by the mean implemented in glPca ? or do I need to do a specific trick ? 

Thank you !

Guillaume


More information about the adegenet-forum mailing list