import.test: Import Background Respiration Data

View source: R/import.test.R

import.testR Documentation

Import Background Respiration Data

Description

The function is used to import raw data of background respiration to R environment. The test should be done immediately before and/or after the actual metabolic rate measurements (pre-test and post-test, respectively).

Usage

import.test(file, info.data,
            n.chamber = c(1,2,3,4,5,6,7,8),
            logger = c("AutoResp", "FishResp", "QboxAqua"),
            meas.to.wait = 0,
            plot.temperature = TRUE,
            plot.oxygen = TRUE)

Arguments

file

the name of a file which the pre- or post-test data are to be read from. Note, if the file contains more than one measurement phase (e.g. M1 and M2), only the first one (M1) will be imported in R.

info.data

a data frame obtained by using the function input.info

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:

  • 'AutoResp' if you use commercial software by 'Loligo Systems'

  • 'FishResp' if you use free software 'AquaResp' in combination with equipment produced by 'PreSens' or 'Pyroscience', please convert data to the 'FishResp' format using the functions presens.aquaresp or pyroscience.aquaresp, respectively.
    If you do not use commercial software or 'AquaResp' for running intermittent-flow respirometry, adjust raw data manually to the 'FishResp' format (see Details below).

  • 'QboxAqua' if you use commercial software by 'Qubit Systems'

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.

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

Do not use this function if an empty chamber is used for controlling background respiration in parallel with actual metabolic rate measurements. See about application of 'parallel' method in the function correct.meas
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 1

  • Ox.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 or convert.rMR.

  • ...

Value

The function returns a data frame containing standardized raw data of a background respiration test. The data frame should be used in the function correct.meas to correct metabolic rate measurements for background respiration.

Examples

# Import raw data for pre- and post-tests

# if the data have been already loaded to R,
# skip the first line of the code:
data(info)

pre.path = system.file("extdata/stickleback/pre_raw.txt.xz", package = "FishResp")
pre <- import.test(pre.path,
                   info.data = info,
                   logger = "AutoResp",
                   n.chamber = 4,
                   plot.temperature = TRUE,
                   plot.oxygen = TRUE)

post.path = system.file("extdata/stickleback/post_raw.txt.xz", package = "FishResp")
post <- import.test(post.path,
                    info.data = info,
                    logger = "AutoResp",
                    n.chamber = 4,
                    plot.temperature = TRUE,
                    plot.oxygen = TRUE)


FishResp documentation built on Sept. 18, 2022, 5:06 p.m.