Description Usage Arguments Value Examples
Plot posterior values from DAPC analysis in adegenet
1 | ggcompoplot(da.object, gid, pal = rainbow, cols = 1)
|
da.object |
an object of class "dapc" |
gid |
an object of class "genind" |
pal |
a color palette |
cols |
the number of columns to display |
a ggplot object with each population stacked on top of each other.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | library('adegenet')
library('ggcompoplot')
library('ggplot2')
data(microbov)
strata(microbov) <- data.frame(other(microbov))
dapc1 <- dapc(microbov, n.pca=20, n.da=15)
setPop(microbov) <- ~breed
compoplot(dapc1, lab="") # Adegenet compoplot
# Showing per breed
ggcompoplot(dapc1, microbov) + theme(axis.text.x = element_blank())
## Not run:
# 3 columns
ggcompoplot(dapc1, microbov, col = 3) + theme(axis.text.x = element_blank())
# Different color palette
ggcompoplot(dapc1, microbov, col = 3, pal = funky) + theme(axis.text.x = element_blank())
# Per Country
setPop(microbov) <- ~coun
ggcompoplot(dapc1, microbov) + theme(axis.text.x = element_blank())
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.