View source: R/extract.slope.R
extract.slope | R Documentation |
The function extracts the slopes of the linear regression of corrected O_{2} concentration over time with defined parameters (see Arguments).
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)
clean.data |
a data frame obtained by using the function |
method |
string: the method of extracting slopes:
|
r2 |
numeric: minimal coefficient of determination (r^{2}) for extracted slopes. Coefficient of determination is used as a threshold of quality to be determined by the user (by default r^{2} = 0.95) |
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) |
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
.
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.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.