Learn R Programming

sarp.snowprofile (version 1.3.2)

numberOfPWLsPerVerticalLevel: Count number of PWLs per vertical level

Description

This is a wrapper function to bin several weak layers (or crusts) into vertical levels. The layers to be binned can be controlled with a provided index vector for full customization.

Usage

numberOfPWLsPerVerticalLevel(x, pwl_idx, depth_breaks = c(0, 30, 80, 150, Inf))

Value

This function returns a table object

Arguments

x

snowprofile or snowprofileLayers object

pwl_idx

an index vector that corresponds to the layers of interest. Tip: this can also be a call to findPWL, see examples.

depth_breaks

a vector of break points referring to absolute depth values. Inf is a placeholder for max depth.

Author

fherla

Examples

Run this code
SH_idx <- findPWL(SPpairs$C_day1, pwl_gtype = "SH")
numberOfPWLsPerVerticalLevel(SPpairs$C_day1, SH_idx)

numberOfPWLsPerVerticalLevel(SPpairs$C_day2, findPWL(SPpairs$C_day2))

Run the code above in your browser using DataLab