format_num: Round and pad a number to a specific decimal place

View source: R/utilities.R

format_numR Documentation

Round and pad a number to a specific decimal place

Description

Round and pad a number to a specific decimal place

Usage

format_num(x, digits = 3)

Arguments

x

Numeric vector

digits

Number of digits to retain

Value

a character vector of formatted numbers

Examples


std.error <- c(0.12, 0.001, 1.2)
format_num(std.error)


rdss documentation built on Oct. 11, 2024, 1:08 a.m.