Description Usage Arguments Value Examples
Expands a range of integers into all the integers it contains
1 | expand_numeric(x, sep = NULL, replace = FALSE)
|
x |
A character vector containing condensed ranges of numbers; "a-b" or "a - b". |
sep |
The character separating the integers for output. Defaults to 'NULL', which will return a list of integer vectors. |
replace |
Controls if the expanded range is extracted into a list ('FALSE') or replaced within the strings ('TRUE)') |
Either a list of character vectors (if 'replace == FALSE') or a character vector similar to the input vector.
1 2 | `expand_numeric("Precincts 1-5")`
`expand_numeric("Precincts 1-5,7-9", replace = TRUE)`
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.