In rare cases, it may be desirable to drop the units of a variable within an equation. Use drop_u() 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.
Arguments
- x
Variable with unit
Value
Unitless variable (only in Julia)
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))")