| fmap_to_ranges | R Documentation |
Given a vector of values that match the labels of a range-based
format, returns the corresponding low / high bounds (and
inclusivity flags) for each input. Useful for reconstructing the
underlying range from a coded value.
fmap_to_ranges(x, fmt)
x |
A vector of values to look up against the format's labels. Coerced to character before matching. |
fmt |
A |
For multilabel formats where the same label maps to several
ranges, only the first matching range is returned. For full
multi-match behaviour, call franges() directly and join
on label.
A data.frame with one row per element of x and
columns low, high, inc_low, inc_high.
Rows where the input does not match any range label contain NA.
franges
fparse(text = '
VALUE visit_ther (numeric)
[LOW, 1] = 0
[ 8, 22] = 2
[22, 36] = 4
[37, 50] = 6
;
')
fmap_to_ranges(c(0, 2, 4, 6), "visit_ther")
fclear()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.