extract.slope {FishResp} | R Documentation |
Extraction of Slope(s)
Description
The function extracts the slopes of the linear regression of corrected O_{2}
concentration over time with defined parameters (see Arguments).
Usage
extract.slope(clean.data,
method = c("all", "min", "max",
"lower.tail", "upper.tail",
"calcSMR.mlnd", "calcSMR.quant",
"calcSMR.low10", "calcSMR.low10pc"),
r2=0.95, length = 999999, n.slope = 1000,
percent = 10, p = 0.25, G = 1:4)
Arguments
clean.data |
a data frame obtained by using the function |
method |
string: the method of extracting slopes:
|
r2 |
numeric: minimal coefficient of determination ( |
length |
integer: length of a measurement period for slope calculations (in seconds; by default - full length) |
n.slope |
integer: the number of extracted slopes, only one slope is calculated for each measurement phase (used in the methods "min" and "max"; by default - all slopes) |
percent |
integer: percentage of lower or upper tail (used in the methods "lower.tail" and "upper.tail", respectively; by default percent = 10) |
p |
integer: p-value of quantile used in the method "calcSMR.quant" (by default p = 0.25) |
G |
integer: G value is used in the method "calcSMR.mlnd" (by default G = 1:4) |
Value
The function returns a data frame with the information about extracted slopes. The data frame is used in the functions QC.slope
and calculate.MR
.
References
Chabot, D., Steffensen, J. F., & Farrell, A. P. (2016). The determination of standard metabolic rate in fishes. Journal of Fish Biology, 88(1), 81-121.
Herrmann, J. P., & Enders, E. C. (2000). Effect of body size on the standard metabolism of horse mackerel. Journal of Fish Biology, 57(3), 746-760.
Examples
# if the data have been already loaded to R,
# skip the first two lines of the code:
data(SMR.clean)
data(AMR.clean)
SMR.slope <- extract.slope(SMR.clean,
method = "min",
n.slope = 3,
r2=0.95,
length = 1200)
AMR.slope <- extract.slope(AMR.clean,
method = "all",
r2=0.95,
length = 300)