fmt_pct | R Documentation |
The function formats numeric vectors as percentages.
fmt_pct(x)
x |
numeric values |
tabulator()
, mk_par()
Other text formatter functions:
fmt_2stats()
,
fmt_avg_dev()
,
fmt_dbl()
,
fmt_header_n()
,
fmt_int()
,
fmt_n_percent()
,
fmt_signif_after_zeros()
library(flextable)
df <- data.frame(zz = .45)
ft_1 <- flextable(df)
ft_1 <- mk_par(
x = ft_1, j = 1, part = "body",
value = as_paragraph(as_chunk(zz, formatter = fmt_pct))
)
ft_1 <- autofit(ft_1)
ft_1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.