as_scalar {yyjsonr} | R Documentation |
Tag an atomic vector with a single element as class 'scalar'. When output to JSON it will be output as a scalar not a vector
Description
Tag an atomic vector with a single element as class 'scalar'. When output to JSON it will be output as a scalar not a vector
Usage
as_scalar(x)
Arguments
x |
atomic vector with length = 1 |
Value
If x is an atomic vector with length = 1, then object is returned with class 'scalar', otherwise object is returned unmodified
[Package yyjsonr version 0.1.21 Index]