loadModelInterface: Functions implemented by any 'loadflex'-compatible load...

loadModelInterfaceR Documentation

Functions implemented by any loadflex-compatible load model.

Description

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.

Format

A collection of functions which any load model for use with loadflex should implement.

Functions in the interface

  • 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) }

Defining new load models

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.


USGS-R/loadflex documentation built on July 26, 2023, 9:54 p.m.