addWadeSubstrateSizes: Add substrate size variables to wadeable data

Description Usage Arguments Details Examples

View source: R/calculateSubstrateMetrics.r

Description

The substrate size metrics are calculated on variables representing four different sets of the size class data. This function convert the size classes to a diameter and logDiameter for each of those size classes (geometric mean of the extreme sizes) for each of these sets. There are three data sets we need to work with (1) ALL the size_classes (mm) (2) mobile subclasses; i.e., excluding HP, RD, RR, RS, RC, OT, WD (tt) (3) all classes and lumps the boulder class (XB+SB= BL) (bl) (4) mobile subclasses (i.e., excluding HP, RD, RR, RS, RC, OT, WD) and lumps the boulder class (XB+SB= BL) (ttbl)

Usage

1
2
3
4
5

Arguments

uid

a vector of site-visit indicators

size.class

a vector size class codes

Details

The unexported wadeSubstrateSizes returns a data.frame of wadeable substrate sizes. The "BL" class is included because although it isn't directly observed, it is needed for the lumped boulder data sets above.

Examples

1
2
3
4
5
6
d <- expand.grid(uid = 1:2, 
size.class = c("OM", "OT", "WD", "HP", "FN", "SA", "GF", "GC","CB", "SB", "XB", "RS", "RR", "RC"))
addWadeSubstrateSizes(d$uid, d$size.class)
d <- expand.grid(uid = 1:2,
size.class =c('BH', 'BL' ,'CB',  'GR' ,'SA',  'FN' ,'OT'))
addBoatSubstrateSizes(d$uid, d$size.class)

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