dot-check: Arguments

Description Usage Arguments Examples

Description

Verifies whether an argument matches formal requirements.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
.check(
  x,
  type,
  dim = NULL,
  miss = FALSE,
  min = NULL,
  max = NULL,
  values = NULL,
  inf = FALSE,
  null = FALSE
)

Arguments

x

argument

type

character "string", "scalar", "vector", "matrix"

dim

vector/matrix dimensionality: integer scalar/vector

miss

accept missing values: logical

min

lower limit: numeric

max

upper limit: numeric

values

only accept specific values: vector

inf

accept infinite (Inf or -Inf) values: logical

null

accept NULL: logical

Examples

1
cornet:::.check(0.5,type="scalar",min=0,max=1)

cornet documentation built on April 19, 2021, 9:07 a.m.