[adegenet-forum] How are NA values handled by glPca ?
t.jombart at imperial.ac.uk
Tue Mar 18 13:32:57 CET 2014
missing values are replaced by the means of available observations (i.e. mean allele frequency).
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Guillaume Louvel [yom7 at hotmail.fr]
Sent: 18 March 2014 11:33
To: adegenet-forum at lists.r-forge.r-project.org
Subject: [adegenet-forum] How are NA values handled by glPca ?
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 !
adegenet-forum mailing list
adegenet-forum at lists.r-forge.r-project.org
More information about the adegenet-forum