powered by
Call the S3 method format.object_size() to format numbers of bytes.
format.object_size()
format_bytes(x, units = "auto", ...)
A character vector.
A numeric vector (each element represents a number of bytes).
Passed to format().
format()
xfun::format_bytes(c(1, 1024, 2000, 1e+06, 2e+08)) xfun::format_bytes(c(1, 1024, 2000, 1e+06, 2e+08), units = "KB")
Run the code above in your browser using DataLab