generate.sample.pl: Survey Sample of Plot Method

Description Usage Arguments Details Value See Also Examples

View source: R/pl.R

Description

This function uses the data stored in the 'pars.survey.pl´ object to create a plot sampling sample object.

Usage

1
        generate.sample.pl(pop, des, seed = NULL)

Arguments

pop

object of class 'population´, returned by the function generate.population

des

object of class 'design.pl´ returned by the function generate.design.pl

seed

number passed to set.seed() to initialise random number generator

Details

A plot sampling method sample object is generated by simulating a plot sampling survey of the population ‘pop’, using the design specified in ‘des’.

Value

generate.sample.pl returns an object of class 'sample.pl´ which has the following elements:

population

object of class 'population´.

design

object of class 'design.pl´.

detected

vector indicating which animal groups have been detected. 0 indicates that an animal group has not been detected, 1 means that an animal group has been detected.

unit

vector indicating survey units (plots) in which each animal groups was detected.

parents

Details of WiSP objects passed to function

created

Creation date and time

seed

Equal to the argument 'seed' passed to the function

See Also

generate.design.pl, summary.sample.pl plot.sample.pl, set.seed

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
pl.reg <- generate.region(x.length = 100, y.width = 50)
pl.dens <- generate.density(pl.reg)

pl.poppars<-setpars.population(density.pop=pl.dens, number.groups = 100, size.method = "poisson",
                               size.min = 1, size.max = 5, size.mean = 1, exposure.method = "beta",
                               exposure.min = 2, exposure.max = 10, exposure.mean = 6,
                               exposure.shape = 1)
pl.pop <- generate.population(pl.poppars, seed=456)

pl.despars<-setpars.design.pl(pl.reg, n.interval.x = 10, n.interval.y = 20,
                              method = "random",  area.covered = 0.2)
pl.des <- generate.design.pl(pl.despars, seed=789)

pl.samp<-generate.sample.pl(pl.pop, pl.des, seed=101112)
summary(pl.samp)
plot(pl.samp)

DistanceDevelopment/WiSP documentation built on Sept. 18, 2020, 2:55 p.m.