get_oxygen_from_preamble: Extract oxygen information from a Licor file

View source: R/get_oxygen_from_preamble.R

get_oxygen_from_preambleR Documentation

Extract oxygen information from a Licor file

Description

Extracts oxygen information from a Licor file's preamble and adds it to the main data as a new column so it is easier to access.

Usage

  get_oxygen_from_preamble(licor_exdf)

Arguments

licor_exdf

An exdf object representing data from a photosynthetic gas exchange measurement system. The exdf_obj$preamble field must be defined and contain the preamble contents; this will automatically be the case if licor_exdf was created by read_gasex_file.

Details

Licor LI-6800 log files include the oxygen concentration as an entry in the preamble, but it is more helpful to include this information as a column in the main data. The get_oxygen_from_preamble function attempts to move the oxygen concentration (as a percentage) from the preamble into a column.

Value

An exdf object based on licor_exdf that includes the oxygen percentage as a new column called oxygen.

Examples

# Example: Read data from a Licor log file and get the oxygen information from
# the preamble

# Read the file
licor_data <- read_gasex_file(
  PhotoGEA_example_file_path('licor_for_gm_site11.xlsx'),
)

# Here we can see the oxygen percentage in the preamble
str(licor_data$preamble)

# Include the oxygen info as a column in the file
licor_data <- get_oxygen_from_preamble(licor_data)

licor_data[, c('replicate', 'oxygen'), TRUE]

PhotoGEA documentation built on April 11, 2025, 5:48 p.m.