ffi_compute_fluxes {fluxfinder}R Documentation

Compute fluxes for multiple groups (measurements)

Description

Compute fluxes for multiple groups (measurements)

Usage

ffi_compute_fluxes(
  data,
  group_column,
  time_column,
  gas_column,
  dead_band = 0,
  normalize_time = TRUE,
  fit_function = ffi_fit_models,
  ...
)

Arguments

data

A data.frame (or tibble or data.table)

group_column

Name of the grouping column in data, character; pass NULL to run with no grouping

time_column

Name of the time column in data, character

gas_column

Name of the gas (concentration or quantity) column in data, character

dead_band

Length of dead band, the equilibration period at the beginning of the time series during which data are ignore, in seconds (numeric)

normalize_time

Normalize the values so that first is zero? Logical

fit_function

Optional flux-fit function; default is ffi_fit_models

...

Other parameters passed to fit_function

Value

A data.frame with one row per group_column value. It will always include the mean, minimum, and maximum values of time_column for that group, but other columns depend on what is returned by the fit_function.

See Also

ffi_fit_models

Examples

# No grouping
ffi_compute_fluxes(cars, group_column = NULL, "speed", "dist")
# With grouping
cars$Plot <- c("A", "B")
ffi_compute_fluxes(cars, "Plot", "speed", "dist")
# See the introductory vignette for a fully-worked example with real data

[Package fluxfinder version 1.0.0 Index]