Learn R Programming

yamlet (version 1.2.1)

as_spork.unit_string: 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 unit_string
as_spork(x, ...)

Value

units

Arguments

x

unit_string

...

ignored arguments

See Also

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

Examples

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

Run the code above in your browser using DataLab