R/trapTransect.R

Defines functions `trapTransect`

`trapTransect` <-
function(distances, seed.counts, trap.area = 0.0001) {
  if (length(distances) == length(seed.counts)) {
    n <- length(distances)
  } else {
    stop("Lengths of distances and counts differ.")
  }
  if ((length(trap.area) > 1)) stop("Ambiguous trap area.")
  trapTransect <- list(distances = distances,
                    seed.counts = seed.counts,
                    trap.area = trap.area)
  class(trapTransect) <- c("trapTransect","list")
  return(trapTransect)
}

Try the spuRs package in your browser

Any scripts or data that you put into this service are public.

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