Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

find_prefix

Find SI prefix for unit


Description

Find SI prefix for unit

Usage

find_prefix(x, f = min, minexp = -Inf, maxexp = Inf, mu = TRUE)

Arguments

x

a numeric

f

function that produces the number from x that is used to determine the prefix, e.g. min or median.

minexp

minimum (decimal) exponent to consider, e.g. -3 to suppress prefixes smaller than milli (m).

maxexp

maximum (decimal) exponent to consider, e.g. 3 to suppress prefixes larger than kilo (k).

mu

if TRUE, should a proper mu be used for micro, otherwise use u as ASCII-compatible replacement

Value

character with the SI prefix

Author(s)

Claudia Beleites


microbenchmark

Accurate Timing Functions

v1.4-7
BSD_2_clause + file LICENSE
Authors
Olaf Mersmann [aut], Claudia Beleites [ctb], Rainer Hurling [ctb], Ari Friedman [ctb], Joshua M. Ulrich [cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.