Verifies whether an argument matches formal requirements.
.check(
x,
type,
dim = NULL,
miss = FALSE,
min = NULL,
max = NULL,
values = NULL,
inf = FALSE,
null = FALSE
)
argument
character "string"
, "scalar"
, "vector"
, "matrix"
vector/matrix dimensionality: integer scalar/vector
accept missing values: logical
lower limit: numeric
upper limit: numeric
only accept specific values: vector
accept infinite (Inf
or -Inf
) values:
logical
accept NULL
:
logical
cornet:::.check(0.5,type="scalar",min=0,max=1)