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

Description Usage Arguments Details Value References See Also Examples

View source: R/transectHolder.R

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

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

Arguments

...

one or more trapTransect objects

family

the probability density function to fit to the distance count profiles.

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.

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.

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

1
2
3
4
5
6
7
8
9
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

Example output

Loading required package: MASS
Loading required package: lattice
[1] "This object of class transectHolder contains 3 transects."
List of 4
 $ transects :List of 3
  ..$ :List of 3
  .. ..$ distances  : int [1:4] 1 2 3 4
  .. ..$ seed.counts: num [1:4] 4 3 2 0
  .. ..$ trap.area  : num 1e-04
  .. ..- attr(*, "class")= chr [1:2] "trapTransect" "list"
  ..$ :List of 3
  .. ..$ distances  : int [1:3] 1 2 3
  .. ..$ seed.counts: num [1:3] 3 2 1
  .. ..$ trap.area  : num 1e-04
  .. ..- attr(*, "class")= chr [1:2] "trapTransect" "list"
  ..$ :List of 3
  .. ..$ distances  : num [1:5] 0.5 1 1.5 2 2.5
  .. ..$ seed.counts: num [1:5] 3 4 2 3 1
  .. ..$ trap.area  : num 1e-04
  .. ..- attr(*, "class")= chr [1:2] "trapTransect" "list"
 $ family    : chr "Weibull"
 $ parameters: Named num [1:2] 2.37 1.8
  ..- attr(*, "names")= chr [1:2] "shape" "scale"
 $ rng       : chr "rweibull"
 - attr(*, "class")= chr "transectHolder"

spuRs documentation built on May 2, 2019, 12:44 p.m.

Related to transectHolder in spuRs...