Description Usage Arguments Examples
View source: R/fragment_count_refac.R
Create a count fragment based on an integer value and singular/plural units
1 2 | fragment_count(x, units, fallback = 0, spellout = FALSE,
comma = !spellout, thousands_mark = ",", decimal_mark = ".")
|
x |
An integer value. |
units |
A vector of length 2 indicating the singular and plural of x's units (e.g., c("country","countries")). |
fallback |
The character string to return in case of error |
spellout |
Should the integer be expressed as a word (e.g., 17 becomes "seventeen") |
comma |
Should the integer include a thousands in the |
thousands_mark |
The character used to separate orders of a thousand |
decimal_mark |
The character used as the decimal |
1 | fragment_count(as.integer(c(1, 2, 3, NA)), units = c('letter', 'letters'), fallback = "an unknown number of")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.