Calculate percentage of points within a set of cross section points that are near the bottom of the cross section Adds the following columns: is_near_bottom: state whether a point is near the bottom of the cross section (within a specified distance threshold of the bottom), pts_near_bottom: count of points near the bottom of the cross section pct_near_bottom: percent of points near the bottom of the cross section
pct_pts_near_bottom.Rd
Calculate percentage of points within a set of cross section points that are near the bottom of the cross section Adds the following columns: is_near_bottom: state whether a point is near the bottom of the cross section (within a specified distance threshold of the bottom), pts_near_bottom: count of points near the bottom of the cross section pct_near_bottom: percent of points near the bottom of the cross section
Usage
pct_pts_near_bottom(
cs_pts,
distance_from_bottom = 1,
look_only_above_bottom = TRUE,
total_from_bottom_up = FALSE
)
Arguments
- cs_pts
sf dataframe of cross section points (output of cross_section_pts() function)
- distance_from_bottom
numeric, distance threshold (in meters) to determine if a point is near the bottom of the cross section
- look_only_above_bottom
logical, whether to look only at points ABOVE the channel bottom as points that can be classified as "near bottom".
- total_from_bottom_up
logical, whether to use only points ABOVE bottom points as part of total points for calculating percentage of points near bottom. Default is FALSE and ALL points will be used when calculating percentage, even if a point has a Z value BELOW the bottom, but is NOT classified as a bottom point