View source: R/read-licor-txt.r
read_li180_txt | R Documentation |
Reads and parses the header of a data file as output by the LI-180 spectrometer (not to be confused with the LI-1800 spectrometer released in the 1980's by LI-COR) to extract the whole header remark field and also decode whether data is in photon or energy based units. This is a new instrument released in year 2020.
read_li180_txt(
file,
date = NULL,
geocode = NULL,
label = NULL,
tz = NULL,
locale = readr::default_locale(),
s.qty = "s.e.irrad"
)
read_m_li180_txt(
files,
date = NULL,
geocode = NULL,
label = NULL,
tz = Sys.timezone(),
locale = readr::default_locale(),
s.qty = NULL
)
file |
Path to file as a character string. |
date |
a |
geocode |
A data frame with columns |
label |
character string, but if |
tz |
character Time zone used for interpreting times saved in the file header. |
locale |
The locale controls defaults that vary from place to place. The
default locale is US-centric (like R), but you can use
|
s.qty |
character The name of the spectral quantity to be read. One of "s.e.irrad" or "s.q.irrad". |
files |
A list or vector of character strings. |
Function read_m_licor_espd()
calls red_licor_espd()
for each file in files
. See read.table
for
a description of valid arguments for files
.
read_licor_espd()
returns a source_spct
object with
time.unit
attribute set to "second"
and when.measured
attribute set to the date-time extracted from the file header, or supplied
by the user. Spectrometer model, serial number and integration time are
stored in attributes. The whole file header is saved as a comment
while the footer is discarded.
Function read_m_licor_espd()
returns a source_mspct object
containing one spectrum per file read.
The LI-180 spectroradiometer stores little information of the instrument and settings, possibly because they cannot be altered by the user or configured. The length of the file header does not seem to be fixed, so the start of the spectral data is detected by searching for "380nm".
LI-COR Biosciences, Environmental. https://www.licor.com/env/
file.name <-
system.file("extdata", "LI-180-irradiance.txt",
package = "photobiologyInOut", mustWork = TRUE)
licor180.spct <- read_li180_txt(file = file.name)
licor180.spct
getWhenMeasured(licor180.spct)
getWhatMeasured(licor180.spct)
cat(comment(licor180.spct))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.