populate: Populates a species

Description Usage Arguments Details Examples

Description

Creates N individuals for the specified species, on starting positions generated by function FUN.

Usage

1
populate(species, N, FUN = NULL, ...)

Arguments

species

the species

N

number of individuals to be generated

FUN

the generating function for initial positions. Will be called once for x and once for y for each individual. Common choices are NULL (for starting position zero), "runif" or "rnorm"

...

further arguments for FUN. If FUN is a random number generator such as "runif", "n" might be ommited

Details

The individual creation applies the landscape boundary condition to each individual. So, for the case of absorptive boundaries, the individual may be created and instantly killed, as it was created outside the boundaries of the landscape. Thus, it is advisable to check the population size after calling this function.

Examples

1
2
3
L <- Landscape(numb.cells=10)
S <- Species(L)
populate(S, 20, "runif", min=-5, max=5)

andrechalom/TWoLifR documentation built on May 12, 2019, 3:34 a.m.