• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!


Notes On Using R-Forge

Page history last edited by jmm97@... 13 years, 3 months ago

These notes are not meant to be definitive; they are only supplemental to the official R-Forge, Subversion, and TortoiseSVN documentation.  These notes are mostly for my own convenience, in case I need to repeat the process some months or years from now.  But if someone out there finds them useful, I'd be delighted.  I am working under Windows, so here I talk about only the Windows case.  But the process is probably extremely similar under Linux or MacOS.


Reference Material

For the definitive source on using R-Forge, obviously use the official R-Forge documentation.  Here is a short introduction by Stefan Theu├čl and Achim Zeileis (PDF), published in the R Journal.  Here is the User's Manual.


Another obvious source is the TortoiseSVN manual, which you can obtain here.  I went so far as to bring the PDF file to Fedex/Kinko's to have it printed out in a nice bound copy.  Then one night I went out for dinner and quickly flipped through the entire manual page-by-page, but spending a little more time on the parts about setting up and updating a repository.  Chapter 4 ("Daily Use Guide") is particularly helpful; however, see also related information in Chapter 3.


Finally, for some reason I happened to have a copy of this book in my collection: Pragmatic Version Control using Subversion, 2nd ed., by Mike Mason (2006), The Pragmatic Programmers, LLC, Raleigh, NC, and Dallas, TX, 2006.  I found this book helpful, especially for information on updating a repository.  Although the focus of the book is on Subversion, Appendix C has some useful information on TortoiseSVN, including screen grabs.


Set Up Repository


This is to initialize the repository on R-Forge.  Follow the directions under Section 3.2 ("How To Get SVN To Work") of the User's Manual, subsection 3.2.1 (this is for Windows).  The first thing is to obtain and install three pieces of software:


  • puttygen.exe -- Generates a public and private key for security; these act sort of like a password.  It might be possible use some other program to do this.
  • pageant.exe -- Establishes a secure connection to R-Forge.  Probably need to use this specific program, but I could be wrong.  Comes with puttygen.exe in the PuTTY distribution.  Be sure to remember where this executable is, because you'll need to run pageant.exe in the future when you want to update your R package. 
  • TortoiseSVN -- this provides a user-friendly interface to Subversion functionality.  Under Section 3.2 of the R-Forge User's Manual it says that you need a Subversion client ("e.g., 'Tortoise SVN' "), so I think you'd need either TortoiseSVN or perhaps Subversion itself.  I'd strongly suggest using TortoiseSVN.  Obtain here.


Originally, I had thought that you needed to install a fourth piece of software in addition to the above three: Subversion itself.  I had thought that TortoiseSVN would run "on top" of Subversion, and provide a pretty interface to the underlying Subversion software.  (Sort of like how TeXnicCenter runs "on top" of MiKTeX to provide a pretty interface; you still need to install both TeXnicCenter and MiKTeX.)  But now I think that you need only TortoiseSVN; I think that installing TortoiseSVN will also give you the Subversion functionality necessary to interact with R-Forge.


In step 2 under subsection 3.2.1 of the R-Forge User's Manual, you use puttygen.exe to generate the public and private keys, and you upload the public key to R-Forge.  This is the only time you need to run puttygen.exe for this repository.  (If you made a second repositoryon R-Forge, I suppose you could use the same keys, although for security purposes maybe you should generate a new set of keys.)  This generates a public and a private key; I'd suggest saving these keys in two separate .ppk files, one each for the public and private keys.  Do NOT lose these two files.  Make back up copies of these two files.


In step 4, you run pageant.exe to establish the secure connection to R-Forge.  You need to load the private key into pageant.  Now that I think of it, this step and onward should be exactly the same as updating the repository, as described below.


In step 5, you check out the empty repository from R-Forge.  It has been months since I have actually done this, but if I recall correctly and if I understand TortoiseSVN I believe this step will create a folder on your local hard drive that represents the empty repository.  This folder can have an arbitrary name of your choice; let's assume its name is repos.  There should be a pkg subfolder in this folder, if I'm not mistaken.  Place your R package material in this pkg subfolder, as described in Section 4.1 of the R-Forge User's Manual.  Then right click on the repos folder, and select the TortoiseSVN context menu selection for "Commit" (this is analogous to "check in" in ClearCase); see Figure C.4 of Mike Mason's book and Figure 4.8 in section 4.4.1 of the TortoiseSVN User's Manual.


TortoiseSVN is running on your local computer.  In order for TortoiseSVN to interact with the remote R-Forge server to access your R-Forge repository, you need pageant running, and you need that private key loaded into pageant.


Update Repository


Days, weeks, or months later, you may need to modify the stuff in the R-Forge repository.


  1. Run pageant.exe.
  2. Load the private key into pageant as described in Step 4 of subsection 3.2.1 of the R-Forge User's Manual.
  3. Use TortoiseSVN to check out the respository from R-Forge: go to some folder in your local hard drive, right-click there, and select Checkout from the TortoiseSVN context menu selection.  See Figure 4.7 of the TortoiseSVN User's Manual.  This will bring up a dialog box for checking out the repository, and will create a folder on your local hard drive that represents the repository.  This folder will contain the current versions of the R package's files, and can have an arbitrary name of your choice; let's assume its name is repos2.
  4. Replace the contents of the repos2 directory with updated contents.
  5. Right click on the repos2 folder, and select the TortoiseSVN context menu selection for "Commit".  Again, see Figure C.4 of Mike Mason's book and Figure 4.8 in section 4.4.1 of the TortoiseSVN User's Manual.


Note that you don't need puttygen.exe.   But you still need the private key that you generated before; it should be in a .ppk file.  If you have lost this file, it's a problem; you'd probably need to contact the R-Forge administrators and ask them what to do.

Comments (0)

You don't have permission to comment on this page.