Software
Placeholder

prettyunits

Pretty, human readable formatting of quantities

JavaScript

The prettyunits package converts numeric quantities into human-readable text formats. It handles time intervals, bytes, numbers, p-values, and colors, making raw numeric data easier to understand in R outputs.

The package solves the problem of displaying large or small numbers in a more intuitive way for users and reports. It supports multiple formatting options including compact and vague formats for time intervals, automatic unit scaling for bytes and quantities, and preservation of trailing zeros for rounding operations. Each formatter is designed for its specific use case, such as pretty_bytes() for file sizes, pretty_ms() for durations, and time_ago() for relative timestamps.

Contributors