Learn R Programming

gtreg (version 0.4.1)

style_xxx: Style numbers as x's

Description

The purpose of style_xxx() is to convert numeric values in summary tables to x's of consistent length for mock tables. See the Table shells vignette for detailed examples.

Usage

style_xxx(x, width = digits + 2, digits = 0)

Value

a character vector

Arguments

x

a numeric or character vector

width

the width of output field of x's, including the decimal place

digits

the number of digits displayed after the decimal place

Examples

Run this code
style_xxx(7:10, digits = 0)
style_xxx(7:10, digits = 1)
style_xxx(7:10, width = 2, digits = 0)
style_xxx(7:10, width = 5, digits = 2)

Run the code above in your browser using DataLab