Site icon R-bloggers

managing projects using RStudio

[This article was first published on SAS and R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
We’re continually amazed with new developments within RStudio, the integrated developed environment for R that we highlighted previously (Among others, Andrew Gelman agrees with us about its value).

The most recent addition addresses one of our earlier concerns, by adding support for projects within RStudio. These allow work to be divided into multiple contexts, each with their own working directory, workspace, history, and source documents. For those multi-taskers amongst us, this is a big win. Projects can be created within a new or existing directory, as well as through use of a version control system (Git or Subversion).

When you create or move to a project within RStudio lots of useful things happen:
(1) A new R session (process) is started
(2) The .Rprofile file in the project’s main directory (if any) is sourced by R
(3) The .RData file in the project’s main directory is loaded (this can be controlled by an option).
(4) The .Rhistory file in the project’s main directory is loaded into the RStudio History pane (and used for Console Up/Down arrow command history).
(5) The current working directory is set to the project directory.
(6) Previously edited source documents are restored into editor tabs, and
(7) Other RStudio settings (e.g. active tabs, splitter positions, etc.) are restored to where they were the last time the project was closed.

If you haven’t updated your version of RStudio recently, or have never checked it out, this would be a great time to consider it. More information about these new features can be found here, along with an excellent screencast overview here. Happy coding!

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

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.