simulate.transectHolder function

Function to simulate a modelled seed rain from a transectHolder

Function to simulate a modelled seed rain from a transectHolder

This function simulates a two-dimensional seed rain according to the model stored in a transectHolder object. The angle of the seed location from the parent plant is uniformly distributed on [0, 2 pi).

## S3 method for class transectHolder ## S3 method for class 'transectHolder' simulate(object, nsim=1, seed=NULL, ...)

Arguments

  • object: the transectHolder object for simulation
  • nsim: the number of seeds to simulate.
  • seed: if not NULL, set the seed to this value before simulation.
  • ...: additional optional arguments (ignored here).

Returns

A dataframe with n rows with the following components: - distances: seed distances to parent plant

  • angles: seed angles to parent plant, in radians

  • x: x-location of seed

  • y: y-location of seed

References

Jones, O.D., R. Maillardet, and A.P. Robinson. 2009. An Introduction to Scientific Programming and Simulation, Using R. Chapman And Hall/CRC.

See Also

transectHolder

Examples

transect.1 <- trapTransect(distances = 1:4, seed.counts = c(4, 3, 2, 0)) transect.2 <- trapTransect(distances = 1:3, seed.counts = c(3, 2, 1)) transect.3 <- trapTransect(distances=(1:5)/2, seed.counts = c(3, 4, 2, 3, 1)) allTraps <- transectHolder(transect.1, transect.2, transect.3, family="Weibull") allTraps simulate(allTraps, nsim=5, seed=123)
  • Maintainer: Andrew Robinson
  • License: GPL-3
  • Last published: 2018-05-21

Useful links