Learn R Programming

rMR (version 1.1.0)

background.resp: Determine the Background Respiration in a Respirometer

Description

Takes user-defined start and end times to calculate the backround respiration rate in a respirometer.

Usage

background.resp(data, DO.var.name,
time.var.name = "std.time", 
start.time, end.time, col.vec = c("black","red"),...)

Arguments

data

data.frame object to be used, best if formatted by get.witrox.data().

DO.var.name

Column name of DO variable, formatted as a character string.

time.var.name

Column name of time variable as character string. Time column must be formatted as default class for datetime: class = "POSIXct" "POSIXt", strptime format = "%Y-%m-%d %H:%M:%S".

start.time

Input start time as character string of strptime format = "%Y-%m-%d %H:%M:%S".

end.time

Input endtime as character string of strptime format = "%Y-%m-%d %H:%M:%S".

col.vec

Specifies colors on plot in the following order: 1) scatterplot points, 2) regression color.

Passes on arguments to internal functions.

Value

Returns an object of method biglm. The slope of this funtion is the metabolic rate in input units/(default time).

References

Thomas Lumley (2013). biglm: bounded memory linear and generalized linear models. R package version 0.9-1. https://CRAN.R-project.org/package=biglm.

See Also

as.POSIXct, strptime, biglm

Examples

Run this code
# NOT RUN {
##load data##
data(fishMR)

## create time variable in POSIXct format ##
fishMR$std.time <- as.POSIXct(fishMR$Date.time,
                    format = "%d/%m/%Y %I:%M:%S %p")

bgd.resp <- 
background.resp(fishMR, "DO.mgL", 
           start.time = "2015-07-02 16:05:00",
           end.time = "2015-07-02 16:35:00")
# }

Run the code above in your browser using DataLab