flux_calc | R Documentation |
Calculates a flux based on the rate of change of gas concentration over time
flux_calc(
slopes_df,
slope_col,
f_datetime = f_datetime,
temp_air_col,
chamber_volume = deprecated(),
setup_volume,
atm_pressure,
plot_area,
f_fluxid = f_fluxid,
conc_unit,
flux_unit,
cols_keep = c(),
cols_ave = c(),
cols_sum = c(),
cols_med = c(),
cols_nest = "none",
tube_volume = deprecated(),
temp_air_unit = "celsius",
f_cut = f_cut,
keep_arg = "keep",
cut = TRUE,
fit_type = c()
)
slopes_df |
dataframe of flux slopes |
slope_col |
column containing the slope to calculate the flux |
f_datetime |
column containing the datetime of each gas concentration
measurements in |
temp_air_col |
column containing the air temperature used to calculate fluxes. Will be averaged with NA removed. |
chamber_volume |
|
setup_volume |
volume of the flux chamber and instrument together in L, can also be a column in case it is a variable |
atm_pressure |
atmospheric pressure in atm, can be a constant (numerical) or a variable (column name) |
plot_area |
area of the plot in m^2, can also be a column in case it is a variable |
f_fluxid |
column containing the flux IDs |
conc_unit |
unit in which the concentration of gas was measured
|
flux_unit |
desired units for the calculated fluxes. Has to be of the
form amount/surface/time. Amount can be |
cols_keep |
columns to keep from the input to the output. Those columns need to have unique values for each flux, as distinct is applied. |
cols_ave |
columns with values that should be averaged
for each flux in the output. Note that NA are removed in mean calculation.
Those columns will get the |
cols_sum |
columns with values for which is sum is provided
for each flux in the output. Those columns will get the |
cols_med |
columns with values for which is median is provided
for each flux in the output. Note that NA are removed in median calculation.
Those columns will get the |
cols_nest |
columns to nest in |
tube_volume |
|
temp_air_unit |
units in which air temperature was measured.
Has to be either |
f_cut |
column containing cutting information |
keep_arg |
name in |
cut |
if 'TRUE' (default), the measurements will be cut according to
'f_cut' before calculating fluxes. This has no influence on the flux itself
since the slope is provided from flux_fitting,
but it will influence the values of the variables in |
fit_type |
(optional) model used in
flux_fitting. Will be automatically filled if
|
a dataframe containing flux IDs, datetime of measurements' starts,
fluxes in
mmol * m-2 * h-1
or
micromol * m-2 * h-1
(f_flux
) according to flux_unit
, temperature average for each flux in
Kelvin (f_temp_ave
), the model used in
flux_fitting, any column specified in
cols_keep
, any column specified in cols_ave
, cols_med
or cols_sum
with their values treated accordingly over the measurement after cuts, and a
column nested_variables
with the variables specified in cols_nest
.
data(co2_conc)
slopes <- flux_fitting(co2_conc, conc, datetime, fit_type = "exp_zhao18")
flux_calc(slopes,
f_slope,
datetime,
temp_air,
conc_unit = "ppm",
flux_unit = "mmol/m2/h",
setup_volume = 24.575,
atm_pressure = 1,
plot_area = 0.0625)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.