Description Usage Arguments Value Note
Recursive function to calculate the catchment attributes of each stream
segment. It is called by calc_catchment_attributes_rast
for each
outlet and should not be called by the user.
1 | calc_catchment_attributes_rast_rec(dt, id, stat, attr_name)
|
dt |
data.table of stream topology and attributes per segment. |
id |
integer; 'stream' of outlet segment to start the calculation from. |
stat |
name or character vector giving the statistics to be calculated, must be one of: min, max, mean, percent. |
attr_name |
name or character vector of column names for the attribute(s) to be calculated. |
One row data.table with the cumulative number of cells of the total catchment of each segment and the values for each attribute and changes the values in dt.
The values for stats "mean" and "percent" need to be divided by the cumulative number of cells of the total catchment in a subsequent step.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.