How to set up a reproducible R project

June 3, 2013
By

[This article was first published on Revolutions, 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.

If you're thinking about starting a project (for example, a report or paper) using the R language for analysis, the Nice R code blog has some great advice. Following the principles of reproducible research, Macquarie University postdocs Rich FitzJohn and Daniel Falster suggest:

  • Creating a directory structure to separate R code, data, reports, and output
  • Treating data as read-only files: do data-munging in R code, but always start with the source data
  • Consider output artifcacts (figures and tables) as disposable: the data plus the R script is the canonical source
  • Separate function definitions from the workaday scripts linking them together

They also offer some great advice on setting up a project under these guidelines in RStudio. Follow the link below for complete details and other great tips for a reproducible R-based workflow.

Nice R Blog: Designing projects

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

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.



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)