managing projects using RStudio

February 10, 2012
By

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

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 his blog: SAS and R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: 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...

Tags: , , , ,

Comments are closed.