hsize

0th

Percentile

Convert byte sizes into human-readable byte sizes

Convert byte sizes into human-readable byte sizes.

Keywords
internal, programming
Usage
hsize(...)
Arguments
sizes

A numeric vector of sizes.

digits

Number of digits to be presented in the give unit.

units

A character string specifying type of units to use.

bytes

The string used for units of bytes without a prefix. Applied only if units="auto".

...

Not used.

Value

A character vector.

See Also

object.size.

Aliases
  • hsize
  • hsize.numeric
  • hsize.object_size
Examples
# NOT RUN {
sizes <- c(1000^(0:8), 1024^(0:8))
df <- data.frame(size=sizes)
df$SI <- hsize(sizes, standard="SI")
df$TB <- hsize(sizes, units="TB")
df$IEC <- hsize(sizes, standard="IEC")
df$TiB <- hsize(sizes, units="TiB")
print(df)
# }
Documentation reproduced from package R.utils, version 2.8.0, License: LGPL (>= 2.1)

Community examples

Looks like there are no examples yet.