process_chamber: Calculate gasfluxes from dynamic chamber measurement

Description Usage Arguments Details Value Examples

View source: R/devices.R

Description

process_losgatos and process_gasmet are special cases of the general process_chamber with preconfigured settings.

Usage

1
2
3
4
5
process_chamber(data = NULL, meta = NULL, analyzer, pre = FALSE)

process_losgatos(data, meta, ..., pre = FALSE)

process_gasmet(data, meta, ..., pre = FALSE)

Arguments

data

Data frame. Recorded data from device.

meta

Data frame. Metadata containing required informations.

analyzer

Set of setup mappings created by analyzer. The specified name value pairs will override default settings.

pre

If FALSE (the default), flux processing will be executed. If TRUE flux processing will be skipped and preprocessed data frame will be returned.

...

additional parameters.

Details

Data from gas analyzer is split into chunks according to entries in meta files. For each chunk, flux is calculated by fitting linear models and robust linear models (lmRob).

Value

A tibble

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Process custom analyzer
# see `vignette("lyzr")` for more details about the options
custom_analyzer <- analyzer(
  #define datastructure
  time_stamp = "Time",
  conc_columns = c(CH4 = "[CH4]_ppm", CO2 = "[CO2]_ppm"),
  pressure = "GasP_torr",
  pressure_factor = 1.33322,
  temperature = "AmbT_C",
  trimmer = trim_time,
  # define metadata structure
  plot = "plot",
  date = "date",
  start = "start",
  end = "end",
  #define chamber dimensions
  V = 0.01461,
  A = 0.098
)

# Compute fluxes
cc_flux <- process_chamber(
  # specify data
  data = losgatos,
  meta = meta_losgatos,
  #specify analyzer
  analyzer = custom_analyzer
)

# Process LosGatos
lg_flux <- process_losgatos(losgatos, meta_losgatos)
# Process LosGatos with custom chamber dimensions
lg_flux <- process_losgatos(losgatos, meta_losgatos, V = 2, A = 3)

# Process GASMET
gm_flux <- process_gasmet(gasmet, meta_gasmet)

tekknosol/glimmr documentation built on Oct. 17, 2020, 1:39 a.m.