Convert vector if identical elements to scalar
as_scalar.RdReturns unique(x) if all elements of x are identical, throws an error if
not.
Arguments
- x
any object that can be handled by
unique()(usually a vector or list)
as_scalar.RdReturns unique(x) if all elements of x are identical, throws an error if
not.
any object that can be handled by unique() (usually a vector or
list)