View source: R/read_licor_6800_plaintext.R
read_licor_6800_plaintext | R Documentation |
Tool for reading plaintext log files created by Licor LI-6800 instruments and
storing their contents in exdf
objects.
read_licor_6800_plaintext(
file_name,
get_oxygen = TRUE,
include_user_remark_column = TRUE,
...
)
file_name |
A relative or absolute path to a plaintext file containing Licor data. |
get_oxygen |
A logical value indicating whether to get the oxygen percentage from the
file's preamble using |
include_user_remark_column |
A logical value indicating whether to include the user remarks as a column; see below for details. |
... |
Additional arguments; currently unused. |
Licor LI-6800 instruments create two types of log files: a plaintext file and an Excel file, each containing the same information. The plaintext files are the only ones guaranteed to be created, since the Excel files require the user to select an option to create them.
read_licor_6800_plaintext
looks for two special lines in the Licor log
file: the [Head]
line indicates the beginning of the header (or
preamble), and the [Data]
line indicates the beginning of the data
table. If these lines are missing from the file, it will not be loaded
properly.
Closing and reopening a log file: When operating a Licor LI-6800, it
is possible to close and then reopen a log file. Doing this causes the
plaintext log file to contain multiple [Head]
and [Data]
sections. This function is able to handle such files.
User remarks: When operating a Licor LI-6800, it is possible to make
a "remark." Each remark will appear in the plaintext log file in its own line,
which begins with an HH:MM:SS
time and then contains the remark text.
The read_licor_6800_plaintext
function identifies these user remarks
and includes them in the return as an "extra" element called
user_remarks
. Note that changing stability criteria will also generate
a user remark with a message describing the new stability settings.
When include_user_remark_column
is TRUE
, these user remarks will
be included in the main data table as a column called user_remark
. For
each row in the table, the entry in the user_remark
column will be set
to the most recent user remark.
The user remark system is prone to errors, especially since changes to stability settings are recorded in the log files using the exact same format as true user remarks. In general, it is better to record metadata about measurements via user constants rather than user remarks.
User constants as rows: When operating a Licor LI-6800, it is
possible to include user constants as either rows or columns. In general, it
is better to include them as columns, and the read_licor_6800_plaintext
function may not be able to properly read files where they are included as
rows. Support for user constant rows may be added in the future.
An exdf
object that fully includes all the data from the Licor Excel
file. In addition to the elements described in the documentation for
read_gasex_file
, the following "extra" elements are also
included:
preamble
: A data frame containing the "preamble" (or "header")
information from the file.
user_remarks
: A data frame containing any user remarks from the
file. The data frame has two columns for the timestamp and the value,
called remark_time
and remark_value
, respectively.
read_gasex_file
# Example: Reading a Licor plaintext file that is included with the PhotoGEA
# package and viewing some of the "extra" information associated with the file
licor_file <- read_licor_6800_plaintext(
PhotoGEA_example_file_path('plaintext_licor_file')
)
str(licor_file$preamble)
print(licor_file$user_remarks)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.