<div dir="ltr">I've done everything in the DAPC tutorial using this data set over and over no problem, but now I'm attempting to do a simple PCA and I seem to keep running into problems with my genind object.<div><br></div><div>I'm sure ill get some backlash for being a self-taught beginner here, but any help is really greatly appreciated.</div><div><br></div><div>I've imported my STRUCTURE file as a Gendind object no problem.</div><div>Right off the bat its as if adgenet does not recognize the data in the object, see object and following code below...</div><div><br></div><div><font color="#0000ff">>fish</font></div><div><div> #####################</div><div> ### Genind object ### </div><div> #####################</div><div>- genotypes of individuals - </div><div><br></div><div>S4 class: genind</div><div>@call: read.structure(file = file, missing = missing, quiet = quiet)</div><div><br></div><div>@tab: 391 x 172 matrix of genotypes</div><div><br></div><div>@ind.names: vector of 391 individual names</div><div>@loc.names: vector of 11 locus names</div><div>@loc.nall: number of alleles per locus</div><div>@loc.fac: locus factor for the 172 columns of @tab</div><div>@all.names: list of 11 components yielding allele names for each locus</div><div>@ploidy: 2</div><div>@type: codom</div><div><br></div><div>Optional contents: </div><div>@pop: factor giving the population of each individual</div><div>@pop.names: factor giving the population of each individual</div><div><br></div><div>@other: - empty -</div><div><br></div><div><font color="#0000ff">> data(fish)</font></div><div><font color="#ff0000">Warning message:</font></div><div><font color="#ff0000">In data(fish) : data set ‘fish’ not found</font></div><div><font color="#0000ff">> sum(<a href="http://is.na">is.na</a>(fish$tab))</font></div><div>[1] 166</div><div><font color="#0000ff">> X <- scaleGen(fish, NA.method="mean")</font></div><div><font color="#ff0000">Error in .local(x, ...) : unused argument (NA.method = "mean")</font></div><div><font color="#0000ff">> class(X)</font></div><div><font color="#ff0000">Error: object 'X' not found</font></div><div><br></div><div>I also tried this:</div><div><span style="color:rgb(0,0,255)">> X <- scaleGen(fish$tab, NA.method="mean")</span><br></div><div><div><font color="#ff0000">Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘scaleGen’ for signature ‘"matrix"’</font></div></div><div><br></div><div>Am i missing something wildly simple here? Any help is greatly greatly appreciated...</div>-- <br><div class="gmail_signature"><div dir="ltr">Spencer A Bruce<div>113 Hill St. </div><div>Troy, NY 12180<br>518 225 0787</div></div></div>
</div></div>