as_spork.unit_string: Coerce Unit String to Spork

View source: R/spork.R

as_spork.unit_stringR Documentation

Coerce Unit String to Spork

Description

Coerces unit string to spork. A literal dot means different things in spork vs. units, and there may be some other subtleties as well. Unit string is character that is_parseable.

Usage

## S3 method for class 'unit_string'
as_spork(x, ...)

Arguments

x

unit_string

...

ignored arguments

Value

units

See Also

Other spork: as_spork.symbolic_units(), as_spork.units()

Examples

library(magrittr)
library(spork)
'kg.m^2/s^2' %>% as_unit_string %>% as_spork
'kg.m2 s-2' %>% as_unit_string %>% as_spork

bergsmat/yamlet documentation built on Feb. 18, 2024, 5:50 a.m.