err_check_inputs: Error check inputs

View source: R/err_check_input.R

err_check_inputsR Documentation

Error check inputs

Description

Error check inputs

Usage

err_check_inputs(
  targets,
  areas,
  xmat,
  betas,
  areas.update.fun,
  xmat.coltypes,
  xmat.proj,
  xmat.dyn.fun,
  priors,
  restrictions,
  err.txt
)

Arguments

targets

A dataframe with columns times, lu.from (optional), lu.to and value (all targets >= 0)

areas

A dataframe of areas with columns lu.from (optional), ns and value, with all areas >= 0 and with sum(areas) >= sum(targets)

xmat

A dataframe of explanatory variables with columns ks and value

betas

A dataframe of coefficients with columns ks, lu.from (optional), lu.to & value

areas.update.fun

function providing update for dynamic xmat columns, must take as arguments res, curr.areas, priors, xmat.proj, must dataframe with columns ns, lu.from & value defaults to areas.sum_to() which sums over lu.to

xmat.coltypes

A dataframce with columns ks and string value, can be either "static", "dynamic", or "projected"

xmat.proj

dataframe with columns times, ns, ks, must be present for each xmat.coltype specified as projected

xmat.dyn.fun

function providing update for dynamic xmat columns, must take as arguments res, curr.areas, priors, xmat.proj must return ns x ks(dynamic) columns

priors

A dataframe of priors (if no betas were supplied) with columns ns, lu.from (optional), lu.to (with priors >= 0)

restrictions

A dataframe with columns ns, lu.from (optional), lu.to and value. Values must be zero or one. If restrictions are one, the MNL function is set to zero

Internal function. Must throw errors, no return value if inputs do not match the specification. Handle all error checking here Use this for all error checking of inputs.


tkrisztin/downscalr documentation built on June 2, 2025, 1:16 a.m.