calculateWadeableReachLength: Calculates the reach length for a wadeable site

Description Usage Arguments Value Examples

View source: R/calculateGeneral.r

Description

Calculates the reach length for a wadeable site using the number of stations per site and the increment between stations. The number of stations per site must be calculated using nWadeableStations prior to passing to this function. Thus, the data passed to this function is site-level data.

Usage

1
calculateWadeableReachLength(uid, n.station, increment)

Arguments

uid

a vector of site identifiers

n.station

the number of station per site

increment

the distance between stations at a wadeable site

Value

a 'metric' data.frame

Examples

1
2
3
4
5
increment <- expand.grid(uid = 1:10, increment = 1.5)
d <- expand.grid(uid = 1:10, transects = LETTERS[1:11], station = 0:9)
n.sta <- nWadeableStations(d$uid, d$transects, d$station, by = 'site')
d <- merge(increment, n.sta, by = 'uid')
calculateWadeableReachLength(d$uid, d$n.sta, d$increment)

jasonelaw/nrsa documentation built on Nov. 8, 2019, 11:34 a.m.