Description Format Functions in the interface Defining new load models
Solute load models in the loadflex
package, such as loadModel
,
loadReg2
, and loadComp
, all implement a common set of core
functions. These functions are conceptually packaged as the
loadModelInterface
defined here.
A collection of functions which any load model for use with
loadflex
should implement.
getMetadata(load.model) { return(metadata) }
getFittingData(load.model) { return(data.frame) }
getFittingFunction(load.model) { return(function) }
predictSolute(load.model, flux.or.conc, newdata, interval,
level, se.fit, se.pred, attach.units, ...) { return(numeric vector or
data.frame) }
Users may define additional custom load
models for use with loadflex
as long as those models, too, implement
the loadModelInterface. One easy way to implement the interface is to write
the new load model class so that it inherits from the
loadModel
class.
If a new load model class is defined, the user may confirm that the new
class implements the loadModelInterface by running
validLoadModelInterface
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.