It was a 1.1 feature!
Here's the blog post: https://blog.rstudio.com/2017/09/13/rstudio-v1.1---the-little-things/
@andrewH, I'm curious about this bit — do you just find it visually disruptive to have examples run in the console? Or do you mean that you'd prefer that they run in a completely independent R session?
For the latter (running an example without messing with my current environment/session), the reprex
package and especially its Add-in can be helpful.
Cons:
- You have to copy the example to a new script file and add the right
library()
statements
- You still get
reprex::reprex()
output in the console
Pros:
- Stuff created by the example stays out of your workspace/session
- Example code and results all appear together in the RStudio Viewer pane
Also wanted to point out this collection of ideas from the github issue tracker: