My RStudio Configuration

May 30, 2019
By

(This article was first published on R – William Doane, and kindly contributed to R-bloggers)

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 RStudio configuration and custom keyboard shortcuts for RStudio 1.3, MacOS, so that I have a reference.

RStudio Tools, Global options, General, Basic tab

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.

RStudio Tools, Global options, General, Advanced tab

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.

RStudio Tools, Global options, Code, Editing tab

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.

RStudio Tools, Global options, Code, Display tab
RStudio Tools, Global options, Code, Saving tab
RStudio Tools, Global options, Code, Completion tab

I prefer not to have completion options popup on their own when I pause typing. I make too many accidental selections when they auto appear.

RStudio Tools, Global options, Code, Diagnostics tab

Show me all the diagnostic information! I can take it.

RStudio Tools, Global options, Appearance

I use the lovely FiraCode font which uses ligatures to enhance common programming sequences such as the assignment operator <- or inequality predicate !=

RStudio Tools, Global options, Pane layout tab

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.

RStudio Tools, Global options, Packages management tab
RStudio Tools, Global options, Packages, Development tab
RStudio Tools, Global options, R Markdown tab
RStudio Tools, Global options, Sweave tab
RStudio Tools, Global options, Spelling tab
RStudio Tools, Global options, Git/SVN tab

Yes, you should use version control. Take the dive and learn about it.

RStudio Tools, Global options, Publishing tab
RStudio Tools, Global options, Terminal tab
RStudio Tools, Keyboard Shortcuts Customizations - Mac

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.)

To leave a comment for the author, please follow the link and comment on their blog: R – William Doane.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)