import.meas {FishResp} | R Documentation |
Import Raw Data of Metabolic Rate Measurements
Description
The function is used to import raw data of metabolic rate measurements to R environment.
Usage
import.meas(file, info.data,
n.chamber = c(1,2,3,4,5,6,7,8),
logger = c("AutoResp", "FishResp", "QboxAqua"),
date.format = c("DMY", "MDY", "YMD"),
start.measure = "00:00:00",
stop.measure = "23:59:59",
start.measure.date = NA,
stop.measure.date = NA,
set.date.time = NA,
meas.to.wait = 0,
meas.to.flush = 0,
plot.temperature = TRUE,
plot.oxygen = TRUE)
Arguments
file |
the name of a file which raw data of metabolic rate measurements are to be read from |
info.data |
a data frame obtained by using the function |
n.chamber |
integer: the number of chambers used in an experiment (including empty ones) |
logger |
string: the name of a logger software used for intermittent-flow respirometry
|
date.format |
string: date format (DMY, MDY or YMD) |
start.measure |
chron: time when metabolic rate measurements are started |
stop.measure |
chron: time when metabolic rate measurements are finished |
start.measure.date |
chron: date when metabolic rate measurements are started |
stop.measure.date |
chron: date when metabolic rate measurements are finished |
set.date.time |
chron: this parameter is turned off by default and needed to be specified only if raw data were recorded by 'Q-box Aqua' logger software. Specifically, input the date and time when .cmbl file was built in one of the following formats: "dd/mm/yyyy/hh:mm:ss", "mm/dd/yyyy/hh:mm:ss", or "yyyy/mm/dd/hh:mm:ss" (in accourdance to the chosen date.format parameter). |
meas.to.wait |
integer: the number of first rows for each measurement phase (M) which should be reassigned to the wait phase (W). The parameter should be used when the wait phase (W) is absent (e.g. in 'Q-box Aqua' logger software) or not long enough to eliminate non-linear change in DO concentration over time from the measurement phase (M) after shutting off water supply from the ambient water source. |
meas.to.flush |
integer: the number of last rows for each measurement phase (M) which should be reassigned to the flush phase (F). The parameter should be used to eliminate non-linear change in DO concentration over time from the measurement phase (M) after untimely shutting on water supply from the ambient water source. |
plot.temperature |
logical: if TRUE then the graph of raw temperature data is plotted |
plot.oxygen |
logical: if TRUE then the graph of raw oxygen data is plotted |
Details
If you use closed respirometry approach, please standardize raw data. The example of "FishResp" format for 4-channel respirometry system is shown here:
Date&Time | Phase | Temp.1 | Ox.1 | Temp.2 | Ox.2 | Temp.3 | Ox.3 | Temp.4 | Ox.4 |
19/08/2016/18:47:20 | F1 | 24.49 | 7.78 | 24.56 | 7.73 | 24.49 | 7.78 | 24.56 | 7.73 |
19/08/2016/18:47:21 | F1 | 24.49 | 7.78 | 24.56 | 7.73 | 24.49 | 7.78 | 24.56 | 7.73 |
19/08/2016/18:47:22 | M1 | 24.49 | 7.77 | 24.56 | 7.72 | 24.49 | 7.78 | 24.56 | 7.73 |
19/08/2016/18:47:23 | M1 | 24.49 | 7.76 | 24.56 | 7.72 | 24.49 | 7.78 | 24.56 | 7.73 |
where the items are:
Date&Time should be represented in one of the following formats: "dd/mm/yyyy/hh:mm:ss", "mm/dd/yyyy/hh:mm:ss", or "yyyy/mm/dd/hh:mm:ss". Time step-interval is one second: one row of data per second.
Phase should have at least two levels: M (measurement) and F (flush). The ordinal number of a phase should be attached to the level of a phase: F1, M1, F2, M2 ...
Temp.1 contains values of water temperature in Celsius (
C^{o}
) for Chamber 1Ox.1 contains values of dissolved oxygen measured in 'mg/L', 'mmol/L' or 'ml/L' for Chamber 1. If other measurement units were used, convert them to 'mg/L', 'mmol/L' or 'ml/L' using the function
convert.respirometry
orconvert.rMR
....
Value
The function returns a data frame containing standardized raw data of metabolic rate measurements. The data frame should be used in the function correct.meas
to correct metabolic rate measurements for background respiration.
Examples
# Import raw data for standard and active metabolic
# rate measurements (SMR and AMR, respectively)
# if the data have been already loaded to R,
# skip the first line of the code:
data(info)
## Not run:
SMR.path = system.file("extdata/stickleback/SMR_raw.txt.xz", package = "FishResp")
SMR.raw <- import.meas(file = SMR.path,
info.data = info,
logger = "AutoResp",
n.chamber = 4,
date.format = "DMY",
start.measure = "22:00:00",
stop.measure = "06:00:00",
plot.temperature = TRUE,
plot.oxygen = TRUE)
AMR.path = system.file("extdata/stickleback/AMR_raw.txt.xz", package = "FishResp")
AMR.raw <- import.meas(file = AMR.path,
info.data = info,
logger = "AutoResp",
n.chamber = 4,
date.format = "DMY",
plot.temperature = TRUE,
plot.oxygen = TRUE)
# an example for importing raw data recorded by 'Q-box Aqua'
qbox.path = system.file("extdata/qboxaqua/qboxaqua.csv", package = "FishResp")
RMR.raw <- import.meas(file = qbox.path,
info.data = info,
logger = "QboxAqua",
n.chamber = 1,
date.format = "DMY",
start.measure = "23:30:00",
stop.measure = "01:00:00",
set.date.time = "23/02/2014/23:30:22",
meas.to.wait = 200,
plot.temperature = TRUE,
plot.oxygen = TRUE)
## End(Not run)