as_spork.units {yamlet} | R Documentation |
Coerce Units to Spork
Description
Coerces units to spork by coercing first to unit_string.
Usage
## S3 method for class 'units'
as_spork(x, canonical = TRUE, ...)
Arguments
x |
units; see |
... |
ignored arguments |
Value
spork
See Also
Other spork:
as_spork.symbolic_units()
,
as_spork.unit_string()
Examples
library(units)
library(magrittr)
library(spork)
'kg.m^2/s^2' %>% as_units %>% as_spork
'kg.m2 s-2' %>% as_units %>% as_spork
'kg.m^2/s^2' %>% as_units %>% as_spork(FALSE)
'kg.m2 s-2' %>% as_units %>% as_spork(FALSE)
[Package yamlet version 1.2.5 Index]