has_units: has_units

has_unitsR Documentation

has_units

Description

Returns TRUE if x is either (a) unitless, or is not of class "units". If x is of class "units", can test whether the units are equal to u.

Usage

has_units(x, u = NULL)

Arguments

x

(vector) to be tested

u

(optional) expected units

Value

TRUE or FALSE


BAAQMD/unittools documentation built on Jan. 28, 2024, 9:14 p.m.