as_spork.symbolic_units | R Documentation |
Coerces symbolic units to spork by coercing first to unit_string.
## S3 method for class 'symbolic_units'
as_spork(x, canonical = TRUE, ...)
x |
symbolic_units; see |
... |
ignored arguments |
spork
Other spork:
as_spork.unit_string()
,
as_spork.units()
library(units)
library(spork)
x <- as_units('kg.m/s^2')
names(attributes(x))
y <- attr(x,'units')
class(y)
as.character(y)
as.character(attr(x, 'units'))
as_spork(y)
library(magrittr)
'kg.m^2/s^2' %>% as_units %>% attr('units') %>% as_spork
'kg.m2 s-2' %>% as_units %>% attr('units') %>% as_spork
'kg.m^2/s^2' %>% as_units %>% attr('units') %>% as_spork(FALSE)
'kg.m2 s-2' %>% as_units %>% attr('units') %>% as_spork(FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.