Skip to contents

Convert a value to a scalar to opt-out of R default vector casting behavior. This uses the jsonlite::unbox function to "tag" the value as a scalar.

Usage

as_scalar(obj)

Arguments

obj

The value to convert.

Value

The value wrapped as a scalar.