flux_match: Matching continuously measured fluxes with measurement IDs...

View source: R/flux_match.R

flux_matchR Documentation

Matching continuously measured fluxes with measurement IDs and meta data

Description

Matching a dataframe of continuously measured gas concentration data with measurement metadata from another dataframe. Measurements are paired with their metadata based on datetime. Extra variables in both dataframes are kept in the output.

Usage

flux_match(
  raw_conc,
  field_record,
  f_datetime,
  start_col,
  end_col,
  measurement_length,
  fixed_length = TRUE,
  time_diff = 0,
  startcrop = 0,
  ratio_threshold = deprecated(),
  f_conc = deprecated()
)

Arguments

raw_conc

dataframe of CO2 concentration measured continuously. Has to contain at least a datetime column in ymd_hms format and a gas concentration column as double.

field_record

dataframe recording which measurement happened when. Has to contain at least a column containing the start of each measurement, and any other column identifying the measurements.

f_datetime

datetime column in raw_conc (ymd_hms format)

start_col

start column in field_record (ymd_hms format)

end_col

end columne in field_record (ymd_hms format). Only needed if fixed_length = "FALSE".

measurement_length

length of the measurement (in seconds) from the start specified in the field_record

fixed_length

if TRUE (default), the measurement_length is used to create the end column. If FALSE, end_col has to be provided.

time_diff

time difference (in seconds) between the two datasets. Will be added to the datetime column of the raw_conc dataset. For situations where the time was not synchronized correctly.

startcrop

[Deprecated] startcrop is no longer supported. Please use start_cut in flux_fitting instead.

ratio_threshold

[Deprecated] ratio_threshold is no longer supported. Please use ratio_threshold in flux_quality instead.

f_conc

[Deprecated] f_conc is no longer required

Value

a dataframe with concentration measurements, corresponding datetime, flux ID (f_fluxid), measurements start (f_start) and end (f_end).

Examples

data(co2_df_short, record_short)
flux_match(co2_df_short, record_short, datetime, start,
measurement_length = 180)

fluxible documentation built on June 25, 2025, 1:08 a.m.