lowcase_parens: Functions to format the population label

Description Usage Arguments Details See Also Examples

View source: R/table_spec.r

Description

These functions are used to format the "N=" population label on column headers.

Usage

1
2
3
4
5
6
7

Arguments

x

Population count

Details

Which function to use to format the population label is specified on the n_format parameter on the create_table function. These formatting functions provide several options for formatting the "N=", including whether the "N" should be upper case or lower case, and whether or not to put the value in parentheses. If one of these options does not meet the specifications for your report, you may also write your own formatting function and pass it to the n_format function.

See Also

create_table function to create a table.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Create test data
l <- "Label"
n <- 47

cat(paste0(l, lowcase_parens(n)))
# Label
# (n=47)

cat(paste0(l, upcase_parens(n)))
# Label
# (N=47)

cat(paste0(l, lowcase_n(n)))
# Label
# n=47

cat(paste0(l, upcase_n(n)))
# Label
# N=47

dbosak01/reporter documentation built on Sept. 22, 2020, 3:34 p.m.