A package providing several additional binary infix operators for R.
| Operation | Operator | Description
|---------------------------------------------|------------|-------------------------------------
| check if element is within subset | %in{}%
| like %in%
but preserves dimensions
| check if element is within closed interval | %in[]%
| short form of vec >= x & vec <= x
| check if element is within open interval | %in()%
| short form of vec > x & vec < x
| check if element is within mixed interval | %in[)%
| short form of vec >= x & vec < x
| check if element is within mixed interval | %in(]%
| short form of vec > x & vec <= x
| check if element is outside subset | %out%
| negation of %in%
| check if element is outside subset | %out{}%
| like %out%
but preserves dimensions
| check if element is outside closed interval | %out[]%
| short form of !(vec >= x & vec <= x)
| check if element is outside open interval | %out()%
| short form of !(vec > x & vec < x)
| check if element is outside mixed interval | %out[)%
| short form of !(vec >= x & vec < x)
| check if element is outside mixed interval | %out(]%
| short form of !(vec > x & vec <= x)
Using the devtools
library:
library(devtools)
install_github("KKPMW/infixer")
The ideas for function names were borrowed from the author of DescTools package - Andri Signorell.
CRAN:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.