dot-f: Compact and pipe-friendly wrapper to sprintf

dot-fR Documentation

Compact and pipe-friendly wrapper to sprintf

Description

.p() is the same as .f(), but multiplies by 100 first (for percents). .fm() is the same as .f(), but puts braces around commas for use in latex math mode.

Usage

.f(x, digits)

.p(x, digits)

.fm(x, digits)

Arguments

x

A floating point number

digits

Number of decimals to display

Examples

runif(1) |> .f(2)
runif(1) |> .p(2)
runif(1, 100000, 200000) |> .fm(2)

pbreheny/breheny documentation built on April 26, 2024, 10:40 a.m.