powered by
Help function to format the count and percent into one string.
h_fmt_count_perc(cnt, perc = NULL, format, ...)
A character vector of formatted counts and percents.
(numeric) numeric vector for count.
numeric
(numeric) numeric vector for percent, if Null only format count.
(string) formatting string from formatters::list_valid_format_labels() for formatters::format_value() function.
string
formatters::list_valid_format_labels()
formatters::format_value()
other arguments to be passed to formatters::format_value.
h_fmt_count_perc(cnt = c(5, 9, 12, 110, 0), format = "xx") h_fmt_count_perc( cnt = c(5, 9, 12, 110, 0), perc = c(0.0368, 0.0662, 0.0882, 0.8088, 0), format = "xx (xx.x%)" )
Run the code above in your browser using DataLab