Ensure that distance input is plain numeric in meters, regardless of
whether it is provided as a units object (e.g., a distance in kilometers),
a plain numeric or another vector-like object with numeric storage.mode.
Usage
preprocess_distance(x, arg_name = deparse(substitute(x)))Arguments
- x
A distance value which may be
numeric, or aunits::unitsobject, or any other object for which the underlyingstorage.modeis numeric.- arg_name
Name of the argument, used in messages/errors.
