View source: R/get_oxygen_from_preamble.R
get_oxygen_from_preamble | R Documentation |
Ensures that the oxygen percentage (contained in the preamble of a Licor file) is properly documented (including units).
get_oxygen_from_preamble(licor_exdf)
licor_exdf |
An |
Licor LI-6800 log files include the oxygen concentration as an entry in the
preamble, which is automatically converted to a column by
read_licor_6800_Excel
and
read_licor_6800_plaintext
. However, the Licor log files do not
specify units for this value; they should be percent
.
This function adds the correct units to the Oxygen
column, or creates
one (with values initialized to NA
) if the Oxygen
column is not
present.
Also note that this function is called automatically by
read_licor_6800_Excel
and
read_licor_6800_plaintext
whenever get_oxygen
is
TRUE
; this happens by default, so it is rare for a user to call this
function directly.
An exdf
object based on licor_exdf
that includes the
Oxygen
column units.
# Example: Read data from a Licor log file and get the oxygen information from
# the preamble
# Read the file without automatically specifying oxygen units
licor_data <- read_gasex_file(
PhotoGEA_example_file_path('licor_for_gm_site11.xlsx'),
get_oxygen = FALSE
)
# Here we can see that the oxygen column is included, but without units
print(licor_data$categories$Oxygen)
print(licor_data$units$Oxygen)
print(licor_data[, 'Oxygen'])
# Include the oxygen units
licor_data <- get_oxygen_from_preamble(licor_data)
# The units have changed, but the category and values have not
print(licor_data$categories$Oxygen)
print(licor_data$units$Oxygen)
print(licor_data[, 'Oxygen'])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.