spiro_raw {spiro} | R Documentation |
Get raw data from a metabolic cart file or an imported spiro object
Description
spiro_raw()
retrieves cardiopulmonary raw data from various types of
metabolic cart files, or from objects previously imported and processed with
spiro
.
Usage
spiro_raw(data, device = NULL, anonymize = TRUE)
## Default S3 method:
spiro_raw(data, device = NULL, anonymize = TRUE)
## S3 method for class 'spiro'
spiro_raw(data, device = NULL, anonymize = TRUE)
Arguments
data |
Either the absolute or relative path of the file that contains
the gas exchange data, or a data frame of the class |
device |
A character string, specifying the device for measurement. By
default the device type is guessed by the characteristics of the
|
anonymize |
Whether meta data should be anonymized during import.
Defaults to TRUE. See |
Details
The default way of importing data into the spiro package is using the
spiro
function. Besides importing this will perform further
processing steps such as the interpolation of data or the calculation of
additional variables. But in some cases the original raw data may be
preferable compared to the processed raw data. spiro_raw
can either
retrieve the raw data from an already imported data set or from a new raw
data file.
Value
A data.frame
with data. The attribute info
contains
addition meta-data retrieved from the original file.
Methods (by class)
-
spiro_raw(default)
: Method for direct import from metabolic cart raw data file -
spiro_raw(spiro)
: Method for objects of classspiro
, usually files previously imported and processed withspiro
Examples
# Get example data
file <- spiro_example("zan_gxt")
# direct import of raw data
out <- spiro_raw(file)
head(out)
# retrieval of raw data from previously processed object
s <- spiro(file)
out2 <- spiro_raw(s)
head(out2)