Description Usage Arguments Details Value See Also Examples
This function uses the data stored in the 'pars.population´ object to create a new population object.
1 | generate.population(pars.population, seed = NULL)
|
pars.population |
An object created by the function |
seed |
the number passed to set.seed() to initialise random number generator |
An animal population is generated as population object. generate.population
works with the object 'pars.population´ that was generated by the function setpars.population
. setpars.population
has to be run prior.
generate.population
returns an object of class 'population´ which has the following elements:
region |
object of class 'region´ |
groupID |
vector of identification numbers for the animal groups. |
posx |
vector of x-positions of the animal groups. |
posy |
vector of y-positions of the animal groups. |
groupsize |
vector of sizes of the animal groups. |
ntypes |
number of possible type properties for the animal groups. |
types |
vector of type properties of the animal groups. |
minexposure |
lowest possible group exposure value. |
maxexposure |
highest possible group exposure value. |
exposure |
vector of exposure values of the animal groups. |
parents |
Details of WiSP objects passed to function |
created |
Creation date and time |
seed |
Equal to the argument 'seed' passed to the function |
setpars.population
, summary.population
plot.population
1 2 3 4 5 6 7 8 9 10 11 12 13 | reg <- generate.region(x.length = 50, y.width = 80)
# set up a linear density, add a hotspot and a stripe
dens <- generate.density(reg, nint.x = 50, nint.y = 40, southwest = 1, southeast = 10, northwest = 20)
dens<-add.hotspot(dens, 20,10, 100,10)
dens<-set.stripe(dens, 2,5, 50,70, value = 0, width = 10)
pop.pars<-setpars.population(density.pop = 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)
pop <- generate.population(pop.pars)
summary(pop)
plot(pop)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.