si2f: Inverse of 'sitools::f2si()'

View source: R/si2f.R

si2fR Documentation

Inverse of sitools::f2si()

Description

Inverse of sitools::f2si()

Usage

si2f(string, unit = "")

Arguments

string

A character vector representing numbers along with SI prefixes and possibly a unit.

unit

The unit to expect after the SI prefix, if any.

Value

A numeric vector containing the values parsed from string.

Examples

# convert single number
si2f("10k")

# convert single number with unit
si2f("23 mV", unit = "V")

# convert list of numbers
si_strings <- c("100 k", "35 E", "4 m")
si2f(si_strings)


DarwinAwardWinner/rctutils documentation built on July 22, 2022, 5:19 a.m.