View source: R/parse_num_range.R
fct_num_range | R Documentation |
By default, fct_num_range()
returns the re-leveled factor
fct_num_range(x, .range_sep = " - ", .return = "factor")
.range_sep |
A string which separates the two halves of the numeric range |
.return |
A string ("factor" or "table") indicating the function output |
.fctr |
A factor or atomic vector that can be coerced into a factor |
This function takes a factor and typically returns the same but re-leveled so that ambiguous numeric ranges (e.g. less than 10, 11-15, 16-20, more than 20) are ordered correctly as factor levels. The function can also be directed to return a table with the full level parsing, including upper and lower boundaries. This useful in complex cases where this parser is insufficient. The function also removes any currency symbols and thousands separators. It is localized for US - North America where "," is the thousands separator and "." is the decimal separator.
Either the input factor re-leveled or the table of levels parsed into columns
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.