Note about RStudio server

Fixes #651
This commit is contained in:
Hadley Wickham 2022-09-07 17:15:28 -05:00
parent 50e8e3965b
commit e0f692a705
1 changed files with 10 additions and 1 deletions

View File

@ -195,11 +195,20 @@ knitr::include_graphics("diagrams/rstudio/clean-slate.png", dpi = 270)
There is a great pair of keyboard shortcuts that will work together to make sure you've captured the important parts of your code in the editor:
1. Press Cmd/Ctrl + Shift + F10 to restart RStudio.
1. Press Cmd/Ctrl + Shift + F10 to restart R.
2. Press Cmd/Ctrl + Shift + S to re-run the current script.
We collectively use this pattern hundreds of times a week.
::: callout-note
## RStudio server
If you're using RStudio server, your R session is never restarted by default.
When you close your RStudio server tab, it might feel like you're closing R, but the server actually keeps it running in the background.
The next time you return, you'll be in exactly the same place you left.
This makes it even more important to regularly restart R so that you're starting with a refresh slate.
:::
### Where does your analysis live?
R has a powerful notion of the **working directory**.