This is a pre-marshalling guard for Rducks type descriptors. It checks the R value shape that the marshaller expects for scalar, decimal, enum, list, array, struct, map, and union descriptors.
Usage
rducks_check_value(type, x, size = NULL, what = "value")
rducks_check_argument(type, x, name = "argument")
rducks_check_return(type, x)Arguments
- type
A
rducks_typedescriptor such asINTEGER,INTEGER[],STRUCT(a = INTEGER), or a character scalar token accepted byrducks_type_normalize().- x
R value to check.
- size
Optional exact length for scalar/vector checks.
- what
Label used in error messages.
- name
Argument label used by
rducks_check_argument()in error messages.