data(nancycats)
nancycats
nancycats$pop
# let's isolate populations 4 and 8
temp <- nancycats@pop=="P04" | nancycats@pop=="P08"
obj <- nancycats[temp,]
obj
truenames(obj)$pop
# let's isolate two markers, fca23 and fca90
nancycats$loc.names
# they correspond to L2 and L7
temp <- nancycats$loc.fac=="L2" | nancycats$loc.fac=="L7"
obj <- nancycats[,temp]
obj
obj$loc.fac
obj$loc.names
# illustrate how other slot is handled
colonies <- genind2genpop(nancycats)
colonies@other$aChar <- "This will not be proceeded"
colonies123 <- colonies[1:3]
colonies
colonies@other$xy
Run the code above in your browser using DataLab