- Notifications
You must be signed in to change notification settings - Fork1
wlandau/grapes
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
In some computing subcultures, the term "grapes" refers to the percent sign, which R uses to name binary operators such as%*%. Here,grapes is an R package that turns arbitrary functions into binary operators. As with themagrittr pipe, this allows you to avoid cumbersome parentheses in your code.
library(grapes)grow(rbind, c, from = "base") # Use `from` to specify a package or environment to search.bunch() # see the operators (grapes you have grown)nrow(sleep) # 20longer = sleep %rbind% sleep %rbind% sleep # No clumsy parentheses!nrow(longer) # 60. Most of us would like to sleep longer.1 %rbind% 2 %c% 3To install the development version, get thedevtools package and run
devtools::install_github("wlandau/grapes", build = TRUE)If you specify a tag, you can install a GitHub release.
devtools::install_github("wlandau/grapes@v1.0.0",build=TRUE)
Theonline package vignette has a complete tutorial. You can load the compiled version from an R session.
vignette("grapes")Please read theissue tracker first, taking care to browse both open and closed issues. Afterwards, if you still feel the need,submit a new issue to log a bug report or feature request.
About
Turn R functions into binary operators.
Resources
Contributing
Uh oh!
There was an error while loading.Please reload this page.
