<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello,<br>
<br>
I have a genlight object (the genlight object has been created with
plink.raw file using the command "recodeA", I want to use the
functions "dudi.pca" and "bca" to perform a between group PCA.<br>
<br>
I have received this code from Valeria to replace the missing values
with 0:<br>
<br>
<div>mydf<-lapply(your_genlight@gen, as.integer)</div>
<div>myrepl<-do.call(rbind, lapply(mydf, function(e) replace(e, <a
href="http://is.na" target="_blank">is.na</a>(e), 0)))</div>
<div>dudi.pca(myrepl)<br>
<br>
This code indeed works and I can perform dudi.pca and bca, but I
was wondering whether this is correct to replace the missing
values with 0 as zero itself exists in the plink.raw for the
markers with no second allele. <br>
<br>
Thank you very much in advance,<br>
Best,<br>
Sara<br>
</div>
<br>
</body>
</html>