microbenchmark (version 1.4-6)

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