4

I have a plethora of both short and long pieces of R code that I would like to track as they evolve.

Does anyone have any recommendation or experience using version-control software with R?

Brandon Bertelsen
  • 43,807
  • 34
  • 160
  • 255
  • it's not a big deal, but are you platform dependent? win? linux? – JD Long Jan 20 '10 at 02:20
  • 3
    Nothing special about R as fa as version control is concerned. This question is equivalent to "What is the best version control system?" which has been asked and answered before. http://stackoverflow.com/questions/77485/what-are-the-relative-strengths-and-weaknesses-of-git-mercurial-and-bazaar http://stackoverflow.com/questions/138621/best-version-control-for-lone-developer http://stackoverflow.com/questions/326429/what-version-control-system-is-most-trivial-to-set-up-and-use-for-toy-projects http://stackoverflow.com/questions/224396/should-i-look-at-version-control-systems-beyond-subversion – dmckee --- ex-moderator kitten Jan 20 '10 at 18:09
  • I'm not locked to one OS, I use a mixture of win, osx, and nix. – Brandon Bertelsen Jan 21 '10 at 14:40

5 Answers5

6

Use

  • whatever your colleagues, friends, ... use --- most systems are technically equivalent and you want to foster rather than hinder collaboration

  • whatever is supported in the editor or IDE you use most

so as ever so often it comes down to network effects --- popular choices create more users which creates more support in tools etc.

R itself does not care. Source code is just text. Personally, I like SVN a lot and use it at home, at work, at R-Forge, on Google Code, on Sourceforge, ... R Core also uses SVN but as I said, it does not really matter. Your choice, your headaches when you need to admin or fix things.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725
  • Dirk, GREAT points! It's easy to overlook the importance of a social network to support tools (the Internet may be minimizing this, but only on the margin). – JD Long Jan 20 '10 at 14:48
  • Agreed, the social element is huge. At this point I'm not working with anyone else on the code but it's quite possible in the future. – Brandon Bertelsen Jan 22 '10 at 16:07
4

Subversion or Git would be my recommendations. I don't think the effectiveness of the versioning system depends on the source code you put in it. R shouldn't be any different from Java or C# that way.

duffymo
  • 305,152
  • 44
  • 369
  • 561
4

There's nothing unique about R that would drive a version control system decision. There are many R projects hosted on Github (in Git) and on Google Code (in Mercurial or Subversion). R-Forge (http://r-forge.r-project.org/) uses SVN.

You may want to have a look at this question for some views on the modern source controlsystems: Git, Mercurial, and Bazaar.

Assuming that you will use either Git, Mercurial, or SVN, I would suggest having a look at Github. It has many very nice features for collaboration.

Community
  • 1
  • 1
Shane
  • 98,550
  • 35
  • 224
  • 217
2

Fossil is wonderfully easy to set up and quickly start using. It also includes a web interface, issue tracker and a wiki, all built-in to the single executable. Fossil is the version control system for SQLite (written by the same author) and runs on Mac, Win and Linux.

dtw
  • 1,785
  • 1
  • 13
  • 13
2

I personally use and strongly suggest Eclipse with the StatET plugin combined with Subclipse for subversioning.

Federico Giorgi
  • 10,495
  • 9
  • 42
  • 56