Description Usage Arguments Value Examples
As with printer page ranges, sometimes you need to process a range. This is usually of years. A user may specify that they want 2000, 2002 and 2005-2008.
1 | parseRange(range, sep = ", *", rsep = " *- *")
|
range |
character. By default, a character vector with dashes to delineate ranges and commas to separate them |
sep |
character Regular expression to for range separator |
rsep |
character Regular expression for range delineator |
character vector of numbers
1 2 3 4 5 | parseRange("5, 7-9, 11")
# [1] "5" "7" "8" "9" "11"
parseRange("2*3;0", sep = "; *", rsep = "\\* *")
# [1] "2" "3" "0"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.