validateArguments: Validate arguments of a function

View source: R/validateArguments.R

validateArgumentsR Documentation

Validate arguments of a function

Description

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

Usage

validateArguments(x, types = "default")

Arguments

x

named list containing function arguments and their values

types

named vector of types for x

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

Value

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

Note

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

Author(s)

Waldir Leoncio

Examples

Adjusted_inv_sinh_CI_OR_2x2(ritland_2007)
## Not run: Adjusted_inv_sinh_CI_OR_2x2(-ritland_2007)


ocbe-uio/contingencytables documentation built on March 19, 2024, 4:30 a.m.