Learn R Programming

fluxfinder (version 1.1.0)

ffi_compute_fluxes: 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,
  ...
)

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.

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 the dead band in seconds (numeric), the equilibration period whose data is dropped. This can be either a single number OR the name of the dead band column in data

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

See Also

ffi_fit_models

Examples

Run this code
# 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

Run the code above in your browser using DataLab