-
Notifications
You must be signed in to change notification settings - Fork 79
/
fmt_header_n.Rd
44 lines (40 loc) · 1013 Bytes
/
fmt_header_n.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summarizor.R
\name{fmt_header_n}
\alias{fmt_header_n}
\title{Format count data for headers}
\usage{
fmt_header_n(n, newline = TRUE)
}
\arguments{
\item{n}{count values}
\item{newline}{indicates to prefix the text with a new line
(sof return).}
}
\description{
The function formats counts as \verb{\\n(N=XX)}. This helper
function is used to add counts in columns titles.
}
\examples{
library(flextable)
df <- data.frame(zz = 1)
ft_1 <- flextable(df)
ft_1 <- append_chunks(
x = ft_1, j = 1, part = "header",
value = as_chunk(fmt_header_n(200))
)
ft_1 <- autofit(ft_1)
ft_1
}
\seealso{
\code{\link[=tabulator]{tabulator()}}, \code{\link[=mk_par]{mk_par()}}
Other text formatter functions:
\code{\link{fmt_2stats}()},
\code{\link{fmt_avg_dev}()},
\code{\link{fmt_dbl}()},
\code{\link{fmt_int}()},
\code{\link{fmt_n_percent}()},
\code{\link{fmt_pct}()},
\code{\link{fmt_signif_after_zeros}()}
}
\concept{text formatter functions}