I help a few of dozen users install RStudio and learn R regularly. Whenever I need to install RStudio on a new machine, I have to think a bit about the configuration options I’ve tweaked. Invariably, I miss a checkbox that leaves me with slightly different RStudio behavior on each system. This post includes screenshots of my currently preferred standard RStudio configuration and custom keyboard shortcuts for RStudio 1.3, MacOS.
If you need an exact copy of your settings, consider the discussion at https://stackoverflow.com/questions/55903423/export-import-rstudio-user-preferences-global-setting-etc/55940249 (h/t: liebrr)
I prefer never to save the workspace and not to restore any workspace that might have been saved. That way, my environment is clean on each project launch and I can be confident that the results I’m observing aren’t an artifact of some previous session.
Showing .Last.value in the Environment pane is a valuable debugging tool. Since the name begins with a period, this variable is hidden by default. However, RStudio lets me make it visible and it’s often helpful to have a quick check on the structure of the last evaluated expression.
I prefer to use 2 spaces for indentation rather than tabs. A space is a space is a space in any text editor, but tabs can behave differently given different users’ and different text editors’ configurations.
Force yourself to adjust to an all UTF-8 encoded world and life— or at least coding— will be much simpler. Consider the experience of Yuhui Xie, creator of the knitr package.
I prefer not to have code completion options popup on their own when I pause typing. I make too many accidental selections when they auto appear.
Show me all the diagnostic information! I can take it.
I use the lovely FiraCode font which uses ligatures to enhance common programming sequences such as the assignment operator <- or inequality predicate !=
By placing the Source and Console side by side in the upper quadrants, I can maximize the vertical space available for each. The History and Connections panes are my least used panes, so I leave those under the left-hand Source pane so that my source files can be full height most of the time.
Yes, you should use version control. Take the dive and learn about it.
On MacOS, my keyboard shortcuts concentrate common actions on the command key while on Windows, I use the ALT key (Alt+Up to clear the console; Shift+Alt+Up to restart the R session, Alt+Right to insert the magrittr pipe operator, etc.)