A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://davidgohel.github.io/flextable/reference/fmt_header_n.html below:

Format count data for headers — fmt_header_n • flextable

Format count data for headersSource: R/summarizor.R

fmt_header_n.Rd

The function formats counts as \n(N=XX). This helper function is used to add counts in columns titles.

Usage
fmt_header_n(n, newline = TRUE)
Arguments
n

count values

newline

indicates to prefix the text with a new line (sof return).

See also

tabulator(), mk_par()

Other text formatter functions: fmt_2stats(), fmt_avg_dev(), fmt_dbl(), fmt_int(), fmt_n_percent(), fmt_pct(), fmt_signif_after_zeros()

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

            

zz
(N=200)

1

On this page

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4