Skip to contents

In rare cases, it may be desirable to drop the units of a variable within an equation. Use drop_unit() to render a variable unitless. See ?u() for more information on the rules of specifying units. Note that units are only supported in Julia, not in R.

Usage

drop_u(x)

Arguments

x

Variable with unit

Value

Unitless variable

Examples

# For example, the cosine function only accepts unitless arguments or
# arguments with units in radians or degrees
sfm = xmile() %>%
build("a", "constant", eqn = "10", units = "minutes") %>%
build("b", "constant", eqn = "cos(drop_u(a))")