openSTARS (version 1.2.2)

calc_catchment_attributes_vect: calc_catchment_attributes_vect Aggregate attributes for the total catchment of each stream segment.

Description

This function aggregates the attributes of each segment for the total catchment of each stream segment. It is called within calc_attributes_edges and should not be called by the user.

Usage

calc_catchment_attributes_vect(dt, stat_vect, attr_name_vect, round_dig)

Arguments

dt

data.table of stream topology and attributes per segment.

stat_vect

name or character vector giving the statistics to be calculated, must be one of: percent, sum.

attr_name_vect

name or character vector of column names for the attribute(s) to be calculated.

round_dig

integer; number of digits to round results to. Can be a vector of different values or just one value for all attributes.

Value

Nothing. The function changes the values of the columns attr_name_vect in dt.