powered by
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
as_scalar(x)
If x is an atomic vector with length = 1, then object is returned with class 'scalar', otherwise object is returned unmodified
atomic vector with length = 1