Separate genotypes per population
## S4 method for signature 'genind'
seppop(x,pop=NULL,truenames=TRUE,res.type=c("genind","matrix"),
  drop=FALSE, treatOther=TRUE, keepNA = FALSE, quiet=TRUE)
## S4 method for signature 'genlight'
seppop(x,pop=NULL, treatOther=TRUE, keepNA = FALSE, quiet=TRUE, ...)| x | a genind object | 
| pop | a factor giving the population of each genotype in 'x' OR a formula specifying which strata are to be used when converting to a genpop object. If none provided, population factors are sought in x@pop, but if given, the argument prevails on x@pop. | 
| truenames | a logical indicating whether true names should be used (TRUE, default) instead of generic labels (FALSE); used if res.type is "matrix". | 
| res.type | a character indicating the type of returned results, a list of genind object (default) or a matrix of data corresponding to the 'tab' slots. | 
| drop | a logical stating whether alleles that are no longer present in a subset of data should be discarded (TRUE) or kept anyway (FALSE, default). | 
| treatOther | a logical stating whether elements of the
 | 
| keepNA | If there are individuals with missing population information, should they be pooled into a separate population (TRUE), or excluded (FALSE, default). | 
| quiet | a logical indicating whether warnings should be issued
when trying to subset components of the  | 
| ... | further arguments passed to the genlight constructor. | 
According to 'res.type': a list of genind object (default) or a matrix of data corresponding to the 'tab' slots.
Thibaut Jombart t.jombart@imperial.ac.uk
## Not run: 
data(microbov)
strata(microbov) <- data.frame(other(microbov))
obj <- seppop(microbov)
names(obj)
obj$Salers
### example using strata
obj2 <- seppop(microbov, ~coun/spe)
names(obj2)
obj2$AF_BI
#### example for genlight objects ####
x <- new("genlight", list(a=rep(1,1e3),b=rep(0,1e3),c=rep(1, 1e3)))
x
pop(x) # no population info
pop(x) <- c("pop1","pop2", "pop1") # set population memberships
pop(x)
seppop(x)
as.matrix(seppop(x)$pop1)[,1:20]
as.matrix(seppop(x)$pop2)[,1:20,drop=FALSE]
## End(Not run)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.