Learn R Programming

shinyMixR (version 0.5.3)

numfmt: set significant digits without rounding higher numbers

Description

This function sets significant digits without rounding any numbers

Usage

numfmt(x, sdig = 3, snc = 6)

Value

a character vector with formatted numbers

Arguments

x

a numerical vector

sdig

a single number defining the number of significant digits

snc

a single number defining the scientific notation cutoff (higher means notation is only used for very small or very large numbers)

Author

Richard Hooijmaijers

Examples

Run this code
numfmt(c(0.012,12345,1))

Run the code above in your browser using DataLab