human_filesize: Human-readable binary file size

View source: R/zen4R_downloader.R

human_filesizeR Documentation

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)

Arguments

x

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

Value

A character vector.

Author(s)

Floris Vanderhaeghe, floris.vanderhaeghe@inbo.be


zen4R documentation built on Sept. 20, 2023, 9:06 a.m.