read_6800_txt {gasanalyzer} | R Documentation |
Reads 6800 text files and creates a tibble with gas-exchange data.
Description
The text files stored by the 6800 contain measured and calculated values that
are read by this function and formatted in a large tibble for use with R.
Constants and metadata (such as calibration information) are also added as
columns. Note that no recalculation of derived variables is performed,
although it is possible to so using recalculate()
after importing the data.
Usage
read_6800_txt(filename)
Arguments
filename |
an text file containing 6800 gas-exchange data. |
Details
Multiple files can be loaded by calling the function with lapply()
or
purrr::map()
to merge multiple files. In this case, it is important
to ensure that the column names will match.
Value
A tibble with gas-exchange data in columns.
See Also
Examples
exampledir <- system.file("extdata", package = "gasanalyzer")
# import factory calibration for example data:
import_factory_cals(exampledir)
# read data
li6800 <- read_6800_xlsx(file.path(exampledir, "lowo2.xlsx"))
li6800_txt <- read_6800_txt(file.path(exampledir, "/lowo2"))
# compare all except equations. Note txt file reports some NAs as zero:
columns_to_check <- names(li6800)[!names(li6800) %in%
c("gasanalyzer.Equations")]
all.equal(li6800[columns_to_check],
li6800_txt[columns_to_check],
tol = 0.01)
[Package gasanalyzer version 0.4.1 Index]