<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>I'm trying to change NAs in my dataset to the mean allele frequency to run various PopGen analyses through adegenet, but have been having trouble. Commands start below.</div><div><br></div><div>Data<-vcfR2genlight(MyVcf)<br></div><div>Data</div><div><div><font size="1">/// GENLIGHT OBJECT /////////</font></div><div><font size="1"><br></font></div><div><font size="1"> // 11 genotypes,  5,467 binary SNPs, size: 877.8 Kb</font></div><div><font size="1"> 7647 (12.72 %) missing data</font></div><div><font size="1"><br></font></div><div><font size="1"> // Basic content</font></div><div><font size="1">   @gen: list of 11 SNPbin</font></div><div><font size="1"><br></font></div><div><font size="1"> // Optional content</font></div><div><font size="1">   @ind.names:  11 individual labels</font></div><div><font size="1">   @loc.names:  5467 locus labels</font></div><div><font size="1">   @chromosome: factor storing chromosomes of the SNPs</font></div><div><font size="1">   @position: integer storing positions of the SNPs</font></div><div><font size="1">   @other: a list containing: elements without names </font></div></div><div><br></div><div>I then try to run the command listed in the tutorial and elsewhere on the forum, which is as follows:</div><div><br></div><div>tab(Data, NA.method="mean").</div><div><br></div><div>This, however, does nothing to replace the NA values in the original "Data" genlight object. I've looked for hours on how to do this with no avail, so any help would be greatly appreciated.</div></div></div></div></div>