<div dir="ltr">Hi Everyone,<div><br></div><div>I am a Master's student and new to R, and I could not find a previous thread on this, so I apologize if I am asking a question someone has already answered.</div><div><br></div><div>Basically, I am trying to use my data to try doing something similar to the 2014 paper "A tutorial for Discriminant Analysis of Principal</div><div><div>Components (DAPC) using adegenet 1.4-1".  I'm working with adegenet 2.0.0.</div></div><div><br></div><div>The data I uploaded only has 1 dataset (as opposed to the example in this paper with 4 datasets where only 1 is selected to work with). In the dataset, there are 49 rows (corresponding to 15 amino acids of an allele variant) and 75 columns (each amino acid in the allele variant has 5 values assigned, hence 15X5). I was wondering if the following script should work to produce a scatterplot:</div><div><br></div><div>- library(adegenet)</div><div>- PSS <- read.csv(file.choose(),header=F)</div><div>- find.clusters(PSS)             - here, I did not use max.n.clust </div><div>- (note: the cluster plot stops at 5...it decreases until 5 and then the slope doesn't go up again, it simply stops. so I would select 5 then(?))</div><div>- head(grp$Kstat,8)             - is it correct to still use 8 (same value as used in the paper)?</div><div>- grp$stat</div><div>- head(grp$grp,10)              - correct to use 10 still (same value as used in the paper)?</div><div>- grp$size</div><div>- dapc1 <- dapc(PSS,grp$grp)</div><div>- scatter(dapc1)</div><div><br></div><div>Also, if I want to make a table and plot like in this paper, [table(pop(x),grp$grp)], how could I do this? What would I do instead of pop?</div><div><br></div><div>Sorry for asking about something so simple. I'm still learning, so I very much appreciate your time and understanding. Any help would be very welcome - thank you so much!</div><div><br></div><div>Best,</div><div><br></div><div>Chelsea</div></div>