format_bytes {RITCH} | R Documentation |
Formats a number of bytes
Description
Formats a number of bytes
Usage
format_bytes(x, digits = 2, unit_suffix = "B", base = 1000)
Arguments
x |
the values |
digits |
the number of digits to display, default value is 2 |
unit_suffix |
the unit suffix, default value is 'B' (for bytes), useful is also 'B/s' if you have read/write speeds |
base |
the base for kilo, mega, ... definition, default is 1000 |
Value
the values as a character
Examples
format_bytes(1234)
format_bytes(1234567890)
format_bytes(123456789012, unit_suffix = "iB", base = 1024)
[Package RITCH version 0.1.26 Index]