<html><body><div style="font-family: trebuchet ms,sans-serif; font-size: 12pt; color: #000000"><div>Hi,</div><div><br></div><div>the `data(fish)` won't work because this is a command that fetches a dataset that is shipped with R or a package.</div><div><br></div><div>As for the rest of the errors, can you type `traceback()` after an error and send us the output? Or ideally, if you are allowed to share the dataset, that would be great so that it can be debugged directly.</div><div><br></div><div>Cheers,</div><div>Roman</div><div><br></div><div><span name="x"></span>----<br>In god we trust, all others bring data.<span name="x"></span><br></div><div><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Spencer Bruce" <goatsrunfaster@gmail.com><br><b>To: </b>adegenet-forum@lists.r-forge.r-project.org<br><b>Sent: </b>Tuesday, February 23, 2016 11:20:38 PM<br><b>Subject: </b>[adegenet-forum] PCA for microsat data<br><div><br></div><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><span color="#0000ff" data-mce-style="color: #0000ff;" style="color: #0000ff;">>fish</span></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><span color="#0000ff" data-mce-style="color: #0000ff;" style="color: #0000ff;">> data(fish)</span></div><div><span color="#ff0000" data-mce-style="color: #ff0000;" style="color: #ff0000;">Warning message:</span></div><div><span color="#ff0000" data-mce-style="color: #ff0000;" style="color: #ff0000;">In data(fish) : data set ‘fish’ not found</span></div><div><span color="#0000ff" data-mce-style="color: #0000ff;" style="color: #0000ff;">> sum(<a href="http://is.na" target="_blank" data-mce-href="http://is.na">is.na</a>(fish$tab))</span></div><div>[1] 166</div><div><span color="#0000ff" data-mce-style="color: #0000ff;" style="color: #0000ff;">> X <- scaleGen(fish, NA.method="mean")</span></div><div><span color="#ff0000" data-mce-style="color: #ff0000;" style="color: #ff0000;">Error in .local(x, ...) : unused argument (NA.method = "mean")</span></div><div><span color="#0000ff" data-mce-style="color: #0000ff;" style="color: #0000ff;">> class(X)</span></div><div><span color="#ff0000" data-mce-style="color: #ff0000;" style="color: #ff0000;">Error: object 'X' not found</span></div><div><br></div><div>I also tried this:</div><div><span style="color:rgb(0,0,255)" data-mce-style="color: #0000ff;">> X <- scaleGen(fish$tab, NA.method="mean")</span><br></div><div><div><span color="#ff0000" data-mce-style="color: #ff0000;" style="color: #ff0000;">Error in (function (classes, fdef, mtable)  : unable to find an inherited method for function ‘scaleGen’ for signature ‘"matrix"’</span></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><br>_______________________________________________<br>adegenet-forum mailing list<br>adegenet-forum@lists.r-forge.r-project.org<br>https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum</div><div><br></div></div></body></html>