calc_rate.bg: Calculate background respiration rates

Description Usage Arguments Details Value Examples

View source: R/calc_rate.bg.R

Description

This function uses simple linear regression to automatically calculate the rate of change of oxygen over time for background corrections of the main data. Can be used on multiple datasets of background measures, as long as the time data are identical between measurements. In addition, the data must be in the same time and oxygen units as the data to be corrected. Data can be subset using the from, to, and by arguments. If multiple datasets are included, all are subset by the same criteria.

Usage

1
2
calc_rate.bg(x, xcol = 1, ycol = 2, from = NULL, to = NULL,
  by = "time", plot = TRUE)

Arguments

x

data frame. This is the data to process.

xcol

numeric. Defaults to 1. This is the time column.

ycol

numeric vector. Defaults to 2. Can have length > 1. This is the O2 data.

from

numeric. Defaults to NULL. Defines the lower bound(s) of the data frame to subset. Subsetting is based on the argument: by.

to

numeric. Defaults to NULL. Defines the upper bound(s) of the data frame to subset. Subsetting is based on the argument: by.

by

string. "time" or "row" Defaults to "time". This is the method used to subset the data.

plot

logical. Defaults to TRUE. Will plot the results for visual inspection.

Details

There are no units involved in calc_rate.bg(). This is a deliberate decision. Units are called in a later function when volumetric and/or mass-specific rates of oxygen use are computed in convert_rate() and convert_DO().

Value

A list object of class calc_bg.rate.

Examples

1
calc_rate.bg(urchins.rd, xcol = 1, ycol = 18:19, from = 5, to = 45, by = "time")

januarharianto/respR documentation built on Nov. 13, 2018, 1:21 p.m.