DOI-USGS / loadflex

Models and Tools for Watershed Flux Estimates
http://dx.doi.org/10.1890/ES14-00517.1
Other
14 stars 17 forks source link

consolidate argument checks for predictSolute #222

Open aappling-usgs opened 7 years ago

aappling-usgs commented 7 years ago

Seems like it ought to be possible to put checks like these:

   # Validate arguments
    flux.or.conc <- match.arg.loadflex(flux.or.conc)
    interval <- match.arg.loadflex(interval)
    attach.units <- match.arg.loadflex(attach.units)
    lin.or.log <- match.arg.loadflex(lin.or.log)
   agg.by <- match.arg(agg.by)

in the generic predictSolute rather than at the top of every predictSolute.xx function. Right? Let's try it. If it doesn't work, make sure agg.by <- match.arg(agg.by) gets into predictSolute.loadLm and predictSolute.loadComp and anywhere else it's currently not.