Calculate area of a cross-section using the trapezoidal rule for integration. By default, uses the columns "TAPE" for measurement across xs, "InvertRod" for depth relative to y = 0, and "Bankful" for baseline measurement.
Arguments
- data
A data.frame of cross-section data
- tape
A column from
data
or a numeric vector of tape readings ("x coordinates").- depth
A column from
data
or a numeric vector of rod readings ("y coordinates").- baseline
A column from
data
or vector representing bankfull level.- sum_area
A logical (default
TRUE
) indicating whether to return a single summary of the trapezoidal area or a tibble indicating the area at each section.