I do like Dropbox. I’m a big fan of easy to use solutions to common problems. For me I work at two different sites and I do a significant amount of work at my desktop machine at home as well as on my laptop. Dropbox solved the problem of synchronising files between multiple machines. However Dropbox can go that bit further and take that nice synchronised file store and share it with someone else with a Dropbox account. Now file sharing is nothing new but Dropbox makes it dead easy. Added to that a basic version control system built into the software and you have the workings of a reasonably decent code hosting and development system. Now this isn’t going to be what you’d use to develop a big project with multiple collaborators – there are tools out there like SVN or github far better suited to that task. But when a friend and I found that we needed to share and develop some R code we figured that Dropbox would be perfect for the job.
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)
 "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:
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.