This package provides some functions to assign keyboard shortcut to %in%
and to all magrittr
pipe operators. More are to come if I ever use them or if someone asks for.
if (!requireNamespace("devtools", quietly = TRUE))
install.packages("devtools")
devtools::install_github("DanChaltiel/insertOperatorsAddin")
In RStudio, go to Tools > Modify Keyboard shortcuts > add "insert" in the filter.
For instance, I usually set Ctrl+Shift+I to add %in%
and Ctrl+Shift+P to add %$%
pipe.
This package is based on the example (https://github.com/rstudio/addinexamples) from the RStudio team.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.