Skip to contents

The readosense R package provides an easy way to import raw files from Eosense ecosystem gas flux chambers as R objects that can be used with the Fluxible package.

Installation

You can install the development version of readosense from GitHub with:

# install.packages("pak")
pak::pak("jogaudard/readosense")

Workflow

Importing the log files

library(readosense)

# this step is not needed if you know where your data are
path_logs <- system.file("extdata/ex_logs", package = "readosense")

logs <- eo_import_logs(path_logs)

chamber_log <- eo_logs(logs)

env_variables <- eo_env(logs)

Doing so, the function eo_import_logs is run only once, which is faster.

Importing the data files


# this step is not needed if you know where your data are
path_data <- system.file("extdata/ex_data", package = "readosense")

data <- eo_data(path_data)


# it is more practical to join the environmental data here

data <- data |>
  dplyr::left_join(env_variables, by = dplyr::join_by(f_datetime == datetime))

Using fluxible

The first step of the fluxible workflow would then look like this:

library(fluxible)

conc <- flux_match(
  raw_conc = data,
  field_record = chamber_log,
  f_datetime = f_datetime,
  start_col = closing,
  end_col = opening,
  fixed_length = FALSE
)