View source: R/import_pyroscience_workbench.R
import_pyroscience_workbench | R Documentation |
Imports the raw channel data from Pyroscience Workbench output files. This allows "live" analyses while the trial is still running. This does not utilize the ".pyr" file, nor the text file that is created once the trial is finished. This utilizes the raw channel data found within the "ChannelData" folder that the software makes when the trial starts.
import_pyroscience_workbench(
folder,
o2_unit = "percent_a.s.",
sal = NULL,
keep_metadata = FALSE,
split_channels = FALSE,
merge_close_measurements = "min"
)
folder |
a character string. The filepath to the parent folder (directory) which contains ChannelData. |
o2_unit |
a character string. The unit of O2 measurement to be output in the data frame. Options are described in |
sal |
numeric. If |
keep_metadata |
logical. Should metadata from the file be returned as extra columns in the returned data frame? Default is |
split_channels |
logical. Should a list of data frames be returned with a separate data frame for each channel? Default is |
merge_close_measurements |
used only when
|
A data frame (or list of data frames) is returned.
Date and time, POSIXct format. If split_channels = FALSE
(default), then the timestamp is the average of all the measurements that were merged. For details, see merge_close_measurements
.
Duration of measurement trial (minutes).
Oxygen measurement in desired unit as determined by o2_unit
.
Temperature recorded or defined at beginning of measurement trial.
Salinity (psu). Only displayed if sal != NULL
.
Warning or error messages from Pyroscience Workbench file.
Channel columns (CH_...) are repeated for each channel.
If keep_metadata = TRUE
, then the following columns are appended to the returned data frame:
Phase recorded. Phase is inversely related to O2.
Intensity is an indicator of the quality of the signal.
Ambient light on the sensor. Expressed in mV.
Warning or error messages from Pyroscience Workbench file's temperature measurement.
Atmospheric pressure (mbar).
Warning or error messages from Pyroscience Workbench file's atmospheric pressure measurement.
If split_channels = TRUE
, then "CH_X_
" is removed from the column names and multiple data frames are returned in a named list.
Oxygen conversions are estimates based on the marelac
package.
Matthew A. Birk, matthewabirk@gmail.com
import_presens
, import_witrox
, conv_o2
## Not run:
folder <- system.file('extdata/pyro_wb/', package = 'respirometry')
import_pyroscience_workbench(folder = folder, o2_unit = 'umol_per_l', sal = c(0, 35))
# I want each channel as a separate data frame.
data_list <- import_pyroscience_workbench(folder = folder, split_channels = TRUE)
data_list$CH_2 # here's the channel 2 data frame.
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.