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 June 22, 2024, 11:43 a.m.