Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Setting up shared folders on Dropbox is pretty straightforward but if you’ve never done it before there’s a guide here. The next problem we found was that we had to make sure the script could correctly reference the path to data files and other scripts. Fortunately if your Dropbox folder is located in the same place as the R home directory (is is for a default install on Windows and Mac machines – I haven’t tested this on a Linux box yet) then it should be straightforward process.
You can check your R home directory using (example for Windows XP)
Sys.getenv("R_USER")
[1] "C:/Documents and Settings/Kate/My Documents"
Your Dropbox folder should be in My Documents too. Then in your R script set your working directory or file locations as follows:
setwd(path.expand("~/Dropbox/SharedRScript"))
That way you can define the location of any other called scripts or data relative to your shared folder and they should work irrespective of which machine you are on. So far Dropbox is working pretty well for our needs. It’s free (at least for 2Gb storage), synchronises quickly and is easy to use. You might run into problems if several people are working on a file at the same time – it will save multiple versions rather than try to merge the files. However for us it’s a good and easy solution to collaborative coding.
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.