Description Usage Arguments Details Value
Create a summary table of the predicted prevalence of IRES across continuous size classes and categorical classes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
outp_riveratlaspred |
(character) full path to .csv table containing flow intermittence predictions for global river network |
inp_riveratlas |
(character) full path to .csv. table containing attributes for global river network |
inp_riveratlas_legends |
(character) full path to .xlsx table containing metadata on river atlas attributes (meaning of category acronyms and codes e.g., for land cover) |
idvars |
(character) name of the variable (usually categorical) whose categories to use for producing summary statistics of flow prevalence (e.g., climate or country) |
interthresh |
(numeric) flow intermittence probability threshold above which to classify records as non-perennial. |
castvar |
(character) name of the column that will be used to define bins/table columns (e.g., discharge) —
the equivalent of |
castvar_num |
(boolean) whether casting column (castvar) is a numeric (used for sorting properly). |
weightvar |
(character) variable to weigh proportion by (e.g. river reach length). |
valuevar |
(character) variable to summarize (e.g. intermittency class). |
valuevarsub |
(character) value of |
binfunc |
(character) binning approach. One of 'manual', 'equal_length', 'equal_freq'. See bin_dt. |
binarg |
(numeric) binning argument, depends on binning approach. See bin_dt. |
bintrans |
(character or numeric) transformation of |
na.rm |
(logical) whether to include NAs. |
tidy |
(boolean) whether to keep in tidy long form (TRUE) or to cast into formatted shape (FALSE; i.e., idvars as rows and castvar as columns + a world row) |
nolake |
(boolean) whether to include sections of river reaches that intersect lakes (FALSE) or not (TRUE) |
mincutoff |
(numeric) smallest river reaches to include in computation, in terms of long-term mean annual flow (m3/s; e.g., 0.1) |
this function is used to produce Table 1 in Main Text, Extended Data Figure 1c, and Supplementary Data tables from Messager et al. (2021).
bintrans can either be 'log' (for natural log) or a numeric exponent to transform according to x^bintrans.
data.table
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.