Learn R Programming

tangram (version 0.8.2)

render_f: Format a vector of provided numeric values

Description

Given a vector of data return as strings formatted as requested

Usage

render_f(x, format)

Value

character; formatted values as character strings

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

Examples

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

Run the code above in your browser using DataLab