From e0f692a705b00187cc377987fdc6072eb83f0f74 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Wed, 7 Sep 2022 17:15:28 -0500 Subject: [PATCH] Note about RStudio server Fixes #651 --- workflow-scripts.qmd | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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**.