Skip to contents

Format a single number according to style conventions

Usage

format_number(
  x,
  style = c("fixed", "scientific", "percent", "integer"),
  digits = 2L,
  apa = FALSE
)

Arguments

x

Numeric.

style

"fixed", "scientific", "percent", "integer".

digits

Decimal places.

apa

APA-style leading-zero suppression.