size_humanreadable | R Documentation |
Formats bytes into human-readable units, from "kB" (10^3) to "YB" (10^23).
size_humanreadable(bytes, decimals = 1, decimal.mark = dec_mark())
bytes |
number of bytes |
decimals |
precision, not used for bytes and kilobytes |
decimal.mark |
decimal mark to use, defaults to |
If using object.size()
on an object, this function is equal to using format2()
to format the object size.
size_humanreadable(c(12, 1234, 123456, 12345678))
size_humanreadable(1024 ^ c(0:4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.