landscape.sample: simulates sampling for genetics on the landscape

Description Usage Arguments Details Value Examples

Description

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

Usage

1
landscape.sample(Rland, np = NULL, ns=NULL, pvec=NULL,svec = NULL)

Arguments

Rland

landscape object

ns

number samples per population

np

number of populations to sample

pvec

a vector of populations to sample

svec

A vector of the stages sampled from a landscape. This provides good control over which populations and which stages within populations can be sampled.

Details

This function is intended to provide a lot of flexibility in sampling individuals from a rmetasim landscape

Value

landscape object

Examples

1
2
3
4
5
6
	l <- landscape.new.example()
	l <- landscape.simulate(l,1)
	l.samp <- landscape.sample(l,np=1,ns=24)
	landscape.amova.pairwise(l.samp)
        l.samp2 <- landscape.sample(l,ns=24,pvec=c(2))
	landscape.amova.pairwise(l.samp2) 

rmetasim documentation built on Feb. 8, 2020, 1:06 a.m.