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)


rdddr documentation built on July 3, 2022, 5:06 p.m.