checks: Checks

Description Usage Arguments Details Value Functions Note Examples

Description

Different functions to check parameters, ids, elements and lists

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.paramClass(param, cls)

.checkClass(param, cls, name, cname = c())

.checkAllClass(L, cls, name, cname = c())

.checkClassOneOf(param, clss, name, cname = c())

.checkCharacter(param, name, cname = c())

.checkNumeric(param, name, cname = c())

.checkLogical(param, name, cname = c())

.checkList(param, name, cname = c())

.paramNamed(param)

.checkNamed(param, name, cname = c())

.checkNamedCharacter(param, name, cname = c())

.checkNamedNumeric(param, name, cname = c())

.checkNamedLogical(param, name, cname = c())

.checkNamedList(param, name, cname = c())

.paramNonNeg(param)

.checkNonNeg(param, name, cname = c())

.paramNoNa(param)

.checkNoNa(param, name, cname = c())

.checkIsUniqueId(param, name, cname = c())

.checkIsId(param, name, cname = c())

.paramIsOptionalId(param, name)

.checkSameLength(cname, ...)

.paramAnyNotNull(name, ...)

.checkAnyNotNull(name, cname = c(), ...)

.elementsUnique(A)

.checkUnique(A, name, cname = c())

.elementsUniqueDF(DF, cols)

.checkUniqueDF(DF, cols, cname = c())

.elementsInDict(A, key)

.elementsBContainsAllA(A, B)

.checkBContainsAllA(A, B, name, cname = c())

.checkRefs(A, B, name, cname = c())

.checkRefPresent(A, key, cls, name, cname = c())

.listAllNumeric(L)

.checkAllNumeric(L, name, cname = c())

.listAllNumericOrInDict(L, key)

.checkAllNumericOrInDict(L, key, name, cname = c())

Arguments

param

some parameter.

cls

character; class name.

name

character; for logging the used name for the parameter.

cname

character; for logging the name of the calling function.

L

list.

clss

character vector; list of class names.

...

list of some vectors.

A, B

vectors.

DF

data.frame.

cols

column names.

key

name of the dictionary entry in .DICT.

Details

The .check* functions perform a test and stop with a custom error on fail. All other functions perform a test and return the result.

The used .DICT: looks as follows:

Value

logical

Functions

Note

Internal function only for convenience

Examples

1

frankkramer-lab/RCX documentation built on Oct. 26, 2021, 1:33 a.m.