R-Forge projects and the svn repository

Any Rproject available from R-Forge can be downloaded using subversion (also called svn).

I suppose svn is already installed on your computer, if not just use Ubuntu Software Centre (more info: https://help.ubuntu.com/community/Subversion).

Use the “Anonymous Subversion Access”, go to terminal and type:

svn checkout svn://svn.r-forge.r-project.org/svnroot/projectname/

Each project can contain many packages. Each package is contained in a folder.

To install a package in R, go to terminal and type:

cd ~/projectname/pkg
R CMD check packagename

If there are no errors, you can install the package:

R CMD INSTALL packagename

To build the package tarball:

R CMD build packagename

If you make a change to the code and want to add your contribution to the repository, you should contact one of the administrators of the package to be added to the list of developers.

Once you have your own developer account you can commit your changes in this way:

  1. check out the last copy of the package using the Developer Subversion Access via SSH: svn checkout svn+ssh://developername@svn.r-forge.r-project.org/svnroot/projectname/
  2. go to the directory containing the project (e.g. cd ~/projectname)
  3. type svn status (you get a list of the files you have added(?) or deleted(!) in your copy)
  4. to apply the same changes to the repo, type: svn add path/example.R or  svn delete path/example.R
  5. once you have done this or if you have simply modified existing file, then you are ready to commit: svn commit

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s