setPop | R Documentation |
The following methods allow the user to quickly change the population of a genind object.
setPop(x, formula = NULL) setPop(x) <- value
x |
a genind or genlight object |
formula |
a nested formula indicating the order of the population strata. |
value |
same as formula |
Zhian N. Kamvar
data(microbov) strata(microbov) <- data.frame(other(microbov)) # Currently set on just head(pop(microbov)) # setting the strata to both Pop and Subpop setPop(microbov) <- ~coun/breed head(pop(microbov)) ## Not run: # Can be used to create objects as well. microbov.old <- setPop(microbov, ~spe) head(pop(microbov.old)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.