Learn R Programming

flextable (version 0.4.6)

colformat_int: format integer columns

Description

Format integer columns in a flextable or regulartable.

Usage

colformat_int(x, col_keys, big.mark = ",", na_str = "", prefix = "",
  suffix = "")

Arguments

x

a regulartable object

col_keys

names of the colkeys

big.mark
na_str

string to be used for NA values

prefix

string to be used as prefix or suffix

suffix

string to be used as prefix or suffix

See Also

Other columns formatters: colformat_char, colformat_num

Examples

Run this code
# NOT RUN {
dat <- mtcars

ft <- regulartable(dat)
colkeys <- c("vs", "am", "gear", "carb")
ft <- colformat_int(x = ft, col_keys = colkeys, prefix = "# ")
autofit(ft)
# }

Run the code above in your browser using DataLab