fmt: Common figure formats

View source: R/fmt.R

fmtR Documentation

Common figure formats

Description

Converts a number to favoured formats for inclusion in texts and reports.

Usage

fmt(x, fmt = "count", dp = 1)

Arguments

x

Numerical vector to be formatted.

fmt

Character vector specifying the type of format to be applied.

dp

Decimal place

Value

A Character vector

See Also

fy

Examples


fmt(10.34456,"rate")

fmt(10.34456,"rate", dp=3)

fmt(.1,"rate", dp=3)

paste0(fmt(10.34456,"percent"),"%")

fmt(1034456,"count")

fmt(.001,"rate")

fmt(.001,"p_val")

fmt(.001,"percent")



OlisaNsonwu/jurithy documentation built on Nov. 28, 2023, 3:39 a.m.