table_value: General rounding for tables

View source: R/table_value.R

table_valueR Documentation

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)

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.

Value

a vector of character values (rounded numbers).

See Also

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

Examples


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

with(mtcars, table_value(disp))


table.glue documentation built on Sept. 20, 2024, 5:09 p.m.