mod_infinitable | R Documentation |
This modifies a predicate function to ignore Inf.
mod_infinitable(pred)
pred |
A predicate function |
A new predicate that ignores infinites
# The `is_incrementing` predicate will fail here
x <- c(1, Inf, 3)
is_incrementing(x) # FALSE
is_incrementing_inf <- mod_infinitable(is_incrementing)
is_incrementing_inf(x) # TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.