This is an internal function used by user-level functions to validate their arguments.

validateArguments(x, types = "default")

Arguments

x

named list containing function arguments and their values

types

named vector of types for x

Value

Nothing if all arguments fit their type. An error message otherwise.

Details

Accepted validation types are:

  • "counts"

  • "positive"

  • "probability"

  • "linear, log or logit"

  • "MH or IV"

  • "logit or probit"

  • "increasing or decreasing"

  • A vector of possible values

Note

Types are evaluated alphabetically, and errors accuse no more than one invalid argument at a time.

Author

Waldir Leoncio

Examples

Adjusted_inv_sinh_CI_OR_2x2(ritland_2007)
#> The adjusted inverse sinh CI: estimate = 0.0000 (95% CI 0.0057 to 1.8173)
if (FALSE) Adjusted_inv_sinh_CI_OR_2x2(-ritland_2007) # \dontrun{}