| metab.ols | R Documentation | 
This function runs the ordinary least squares metabolism model on the supplied gas concentration and other supporting data. This is a common approach that allows for the concurrent estimation of metabolism paramters from a timeseries.
metab.ols(do.obs, do.sat, k.gas, z.mix, irr, wtr, ...)
| do.obs | Vector of dissolved oxygen concentration observations, mg L^-1 | 
| do.sat | Vector of dissolved oxygen saturation values based on water temperature. Calculate using o2.at.sat | 
| k.gas | Vector of kGAS values calculated from any of the gas flux models (e.g., k.cole) and converted to kGAS using k600.2.kGAS | 
| z.mix | Vector of mixed-layer depths in meters. To calculate, see ts.meta.depths | 
| irr | Vector of photosynthetically active radiation in micro mols / m^2 / s | 
| wtr | Vector of water temperatures in degrees C. Used in scaling respiration with temperature | 
| ... | additional arguments; currently "datetime" is the only recognized argument passed through  | 
A data.frame with columns corresponding to components of metabolism
numeric estimate of Gross Primary Production, mg O2 / L / d
numeric estimate of Respiration, mg O2 / L / d
numeric estimate of Net Ecosystem production, mg O2 / L / d
Luke A Winslow, Ryan Batt, GLEON Fellows
metab, metab.bookkeep, metab.mle, metab.kalman, metab.bayesian,
library(rLakeAnalyzer)
doobs = load.ts(system.file('extdata', 
                           'sparkling.doobs', package="LakeMetabolizer"))
wtr = load.ts(system.file('extdata', 
                         'sparkling.wtr', package="LakeMetabolizer"))
wnd = load.ts(system.file('extdata', 
                         'sparkling.wnd', package="LakeMetabolizer"))
irr = load.ts(system.file('extdata', 
                         'sparkling.par', package="LakeMetabolizer"))
#Subset a day
mod.date = as.POSIXct('2009-07-08')
doobs = doobs[trunc(doobs$datetime, 'day') == mod.date, ]
wtr = wtr[trunc(wtr$datetime, 'day') == mod.date, ]
wnd = wnd[trunc(wnd$datetime, 'day') == mod.date, ]
irr = irr[trunc(irr$datetime, 'day') == mod.date, ]
z.mix = ts.thermo.depth(wtr)
k600 = k.cole.base(wnd[,2])
k.gas = k600.2.kGAS.base(k600, wtr[,3], 'O2')
do.sat = o2.at.sat.base(wtr[,3], altitude=300)
metab.ols(doobs[,2], do.sat, k.gas, z.mix[,2], irr[,2], wtr[,3])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.