fmt_n | R Documentation |
A function to calculate and format a numeric count.
fmt_n(x)
x |
The input data vector or data frame column. |
This function calculates a count using the Base R sum
function. NA values are not counted. Results are returned as a
character vector.
The formatted count value.
Other helpers:
fmt_cnt_pct()
,
fmt_mean_sd()
,
fmt_median()
,
fmt_quantile_range()
,
fmt_range()
# Create example vector
v1 <- c(4.3, 3.7, 8.7, 6.1, 9.2, 5.6, NA, 0.7, 7.8, 4.9)
# Format n
fmt_n(v1)
# "9"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.