powered by
Formats a number of bytes
format_bytes(x, digits = 2, unit_suffix = "B", base = 1000)
the values as a character
the values
the number of digits to display, default value is 2
the unit suffix, default value is 'B' (for bytes), useful is also 'B/s' if you have read/write speeds
the base for kilo, mega, ... definition, default is 1000
format_bytes(1234) format_bytes(1234567890) format_bytes(123456789012, unit_suffix = "iB", base = 1024)
Run the code above in your browser using DataLab