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.
calc_catchment_attributes_vect(dt, stat_vect, attr_name_vect, round_dig)
data.table of stream topology and attributes per segment.
name or character vector giving the statistics to be calculated, must be one of: percent, sum.
name or character vector of column names for the attribute(s) to be calculated.
integer; number of digits to round results to. Can be a vector of different values or just one value for all attributes.
Nothing. The function changes the values of the columns attr_name_vect in dt.