Learn R Programming

table.glue (version 0.0.5)

table_value: General rounding for tables

Description

table_value() casts numeric vectors into character vectors. The main purpose of table_value() is to round and format numeric data for presentation.

Usage

table_value(x, rspec = NULL)

Value

a vector of character values (rounded numbers).

Arguments

x

a vector of numeric values.

rspec

a rounding_specification object. If no rspec is given, a default setting will round values to decimal places based on the magnitude of the values.

See Also

Other table helpers: table_ester(), table_glue(), table_pvalue()

Examples

Run this code

table_value(0.123)
table_value(1.23)
table_value(12.3)

with(mtcars, table_value(disp))

Run the code above in your browser using DataLab