This function is modified copy of the utils:::format.object_size function which is not exported. The main difference is that it returns values.

format_object_size(x, units = "b", standard = "auto", digits = 1L, ...)

Arguments

x

a number

units

a unit

standard

a standard

digits

number of digits

...

anything else