landscape.sample {rmetasim} | R Documentation |
Randomly pulls a max of ns
individuals from a max of np
populations and returns a landscape object that could be used for
further simulation, but is usually used for analyses and summary
statistics calculatiuons. If one needs a sample of specific
populations/habitats, then these should be given in the vector pvec
landscape.sample(rland, np = NULL, ns = NULL, pvec = NULL)
rland |
landscape object |
np |
number populations |
ns |
number samples per population |
pvec |
vector of population id numbers to sample |
landscape object
l <- landscape.new.example() l <- landscape.simulate(l,1) l.samp <- landscape.sample(l,np=3,ns=24) landscape.amova.pairwise(l.samp) l.samp2 <- landscape.sample(l,ns=24,pvec=c(1,3)) landscape.amova.pairwise(l.samp2)