flux_diff | R Documentation |
to calculate a flux such as gross ecosystem production (GPP) or
transpiration (T) as the difference between other fluxes (such as
GPP = NEE - ER). Datetime and other variables to keep will be taken from the
type1
measurement. Fluxes not used here (soilR, LRC or other) are not lost.
flux_diff(
fluxes_df,
type_col,
f_flux = f_flux,
id_cols,
type_a,
type_b,
diff_name,
cols_keep = "none"
)
fluxes_df |
a dataframe containing fluxes |
type_col |
column containing type of flux |
f_flux |
column containing flux values |
id_cols |
columns used to identify each pair of fluxes |
type_a |
argument designating type_a fluxes in type column |
type_b |
argument designating type_b fluxes in type column |
diff_name |
name to give to the new calculated flux |
cols_keep |
columns to keep from |
a dataframe with $diff = type_a - type_b$ in long format with diff,
type_a, and type_b as flux type, datetime, and any column specified in
cols_keep
. Values of datetime and columns in cols_keep
for diff row are
taken from type_a measurements.
data(co2_fluxes)
flux_diff(co2_fluxes, type, id_cols = "turfID", cols_keep = c("temp_soil"),
type_a = "NEE", type_b = "ER", diff_name = "GPP")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.