format_guess: Guess the best format for a given set of numerical data

View source: R/helper-format.R

format_guessR Documentation

Guess the best format for a given set of numerical data

Description

Given a vector of data, default to 3 significant digits or all if maximum is greater than zero

Usage

format_guess(x)

Arguments

x

numeric; basic math and quantile function must work on data passed in

Value

numeric; the digits past the decimal recommended for display

Examples

format_guess(rnorm(100))
format_guess(rnorm(100, sd=1e-6))

tangram documentation built on Feb. 16, 2023, 5:59 p.m.