Learn R Programming

freesurferformats (version 1.1.0)

format_bytes_human: Format a number of bytes for human consumption.

Description

Used in the error messages of validate_allocation_size, so that sizes below one gigabyte stay readable. A limit of a few hundred kilobytes would otherwise be reported as '0.00 GB', which is useless when debugging a failed read.

Usage

format_bytes_human(num_bytes)

Value

character string, the size with a unit.

Arguments

num_bytes

single numeric value, the number of bytes.