The readosense R package provides an easy way to import raw files from Eosense ecosystem gas flux chambers as dataframes that can be used with the fluxible package.
readosense can be installed from CRAN:
install.packages("readosense")Or you can install the development version from GitHub with:
# install.packages("pak")
pak::pak("jogaudard/readosense")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.
# 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))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
)