IamAdam
IamAdam

Reputation: 191

Is there a shortcut for %in%?

I have searched unsuccessfully for a keyboard shortcut for %in% in R using RStudio. Wondering if anyone here has figured this out? I have tried all the combinations I could think of.

Upvotes: 19

Views: 9978

Answers (1)

ViviG
ViviG

Reputation: 1726

An answer years later, in case this is still of interest.

You can get this shortcut by using the addinexamples package.

  1. Install the package:

devtools::install_github("rstudio/addinexamples", type = "source")

  1. Restart R
  2. Go to Tools -> Addins -> Browse Addins
  3. Click on Keyboard Shortcuts.... You will see the shortcut for %in%is now Ctrl + Shift + I. You can change the shortcut by clicking on it and running the shortcut you wish.

enter image description here

Upvotes: 10

Related Questions