demcheck: demcheck: Checking functions for the dem packages

Description Details

Description

Functions for checking inputs and data structures in the dem packages, eg demarray. End users would not normally call these functions directly.

Details

Reduce boilerplate code, and give same – hopefully high quality – error messages across all packages.

Try to provide data that can help with debugging.

Has idea of 'scalar'. Not really part of R - scalar is just a vector of length 1 - but often useful, and gives better error messages.

Functions starting with chk_is_ or err_is_ are checking for class or type, loosely defined.

When x passes the test, chk and err functions both return TRUE. When x fails the test, chk functions return a string describing the failure, and err functions raise an error with that string as the error message.


johnrbryant/demcheck documentation built on Dec. 31, 2021, 11:57 a.m.