Learn R Programming

spuRs (version 2.0.2)

trapTransect: Function to construct an object representing a transect of seedtraps.

Description

This function constructs a trapTransect object given a vector of trap distances from the parent plant, a vector of trap seed counts corresponding to the trap distances, and a single trap area.

Usage

trapTransect(distances, seed.counts, trap.area = 0.0001)

Arguments

distances

A vector of trap distances from the parent plant.

seed.counts

A vector of seed counts in each trap.

trap.area

The surface area of each trap.

Value

A trapTransect object, which is a list comprising three objects:

distances

A vector of trap distances from the parent plant.

seed.counts

A vector of seed counts in each trap.

trap.area

The surface area of each trap.

Details

This function is a constructor.

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

mean.trapTransect, print.trapTransect

Examples

Run this code
# NOT RUN {
s1 <- trapTransect(distances = 1:4, seed.counts = c(4, 3, 2, 0))
s1
mean(s1)
# }

Run the code above in your browser using DataLab