diff --git a/workflow-scripts.qmd b/workflow-scripts.qmd index 08b263c..a031219 100644 --- a/workflow-scripts.qmd +++ b/workflow-scripts.qmd @@ -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**.