render_f: Format a vector of provided numeric values

View source: R/helper-format.R

render_fR Documentation

Format a vector of provided numeric values

Description

Given a vector of data return as strings formatted as requested

Usage

render_f(x, format)

Arguments

x

numeric; the data to format. Must work with quantile function.

format

numeric or character; If numeric preserve that many position past the decimal, if character pass directly into sprintf as format string

Value

character; formatted values as character strings

Examples

render_f(rnorm(5), 3)
render_f(round(rnorm(5), 2), "%010.03f")

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