Learn R Programming

spuRs (version 2.0.0)

transectHolder: Function to construct an object representing a collection of trapTransect objects.

Description

This function constructs a transectHolder object given a collection of trapTransect objects and a nominated probability density function to fit to the seed count profile.

Usage

transectHolder(..., family = "exponential")

Arguments

...
one or more trapTransect objects
family
the probability density function to fit to the distance count profiles.

Value

A transectHolder object, which is a list comprising
transects
a list one or more trapTransect objects,
family
the name of the distribution to which the transect data has been fit,
parameters
the estimated parameters for that distribution,
rng
the corresponding random number generator for simulations.

Details

This function is a constructor.

The nominated distribution, which must be one of those distributions that can be fit by fitdistr of the MASS package.

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

trapTransect

Examples

Run this code
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

Run the code above in your browser using DataLab