Learn R Programming

zen4R (version 0.9)

human_filesize: Human-readable binary file size

Description

Takes an integer (referring to number of bytes) and returns an optimally human-readable binary-prefixed byte size (KiB, MiB, GiB, TiB, PiB, EiB). The function is vectorised.

Usage

human_filesize(x)

Value

A character vector.

Arguments

x

A positive integer, i.e. the number of bytes (B). Can be a vector of file sizes.

Author

Floris Vanderhaeghe, floris.vanderhaeghe@inbo.be