byte_format {ggalt} | R Documentation |
Bytes formatter: convert to byte measurement and display symbol.
Description
Bytes formatter: convert to byte measurement and display symbol.
Usage
byte_format(symbol = "auto", units = "binary")
Kb(x)
Mb(x)
Gb(x)
bytes(x, symbol = "auto", units = c("binary", "si"))
Arguments
symbol |
byte symbol to use. If " |
units |
which unit base to use, " |
x |
a numeric vector to format |
Value
a function with three parameters, x
, a numeric vector that
returns a character vector, symbol
the byte symbol (e.g. "Kb
")
desired and the measurement units
(traditional binary
or
si
for ISI metric units).
References
Units of Information (Wikipedia) : http://en.wikipedia.org/wiki/Units_of_information
Examples
byte_format()(sample(3000000000, 10))
bytes(sample(3000000000, 10))
Kb(sample(3000000000, 10))
Mb(sample(3000000000, 10))
Gb(sample(3000000000, 10))
[Package ggalt version 0.4.0 Index]