[adegenet-forum] Dots in the DAPC graphic

Roman Luštrik roman.lustrik at biolitika.si
Thu Oct 12 10:48:34 CEST 2017


Map `grp` argument to your desired grouping. Make sure that you pass `col` the correct number of colors which should match the number of groups you are specifying. 
By default, coloring is done on grouping ( see here ). See this example: 

library(adegenet) 

data(H3N2) 
pop(H3N2) <- factor(H3N2$other$epid) 
dapc1 <- dapc(H3N2, var.contrib=FALSE, scale=FALSE, n.pca=150, n.da=5) 

data.frame(dapc1$grp, pop(H3N2)) # they are matching 

Cheers, 
Roman 



---- 
In god we trust, all others bring data. 
> Zahtevaj IJZ na https://kurc.biolitika.si 


From: "Lucas Veiga" <lucasfip at yahoo.com.br> 
To: adegenet-forum at lists.r-forge.r-project.org 
Sent: Thursday, October 12, 2017 1:34:19 AM 
Subject: [adegenet-forum] Dots in the DAPC graphic 

Dear all, 
I would like to know what I can do for the dots in DAPC graph to be colored according to the populations and not according to the DAPC analysis groups? 

Best regards, 
Lucas Veiga Ayres Pimenta 

_______________________________________________ 
adegenet-forum mailing list 
adegenet-forum at lists.r-forge.r-project.org 
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20171012/4e69c85b/attachment.html>


More information about the adegenet-forum mailing list