These instructions were simplified from Duncan Murdoch's
website, and may make life easier for those who are trying to build R
packages under WindowsXP. It makes no claim to being up to date, but did
work under R 2.4.0 as of 7 December 2006. I assume that you have an R
package, with a DESCRIPTION file, etc. as described in Writing
R Extensions, Section 1.1.
tools for R. Put these in a sensible directory (I use C:/Program
- Install ActivePerl
- Install compilers
by choosing gcc, g77, etc. when prompted.
- Install the Microsoft HTML Help
- If you accepted the default installation locations (and the location for the
Unix tools that I suggest above), add the following to your path environmental
Make sure there is a semi-colon at
the end of the PATH before you append; that is, every path should be separated by a
semi-colon. Also make sure that Perl is in the PATH, but the Perl installer
should have taken care of that. And as R changes versions, put the appropriate
version number in the R PATH.
- Start a command shell and go to the directory prior to the directory that
holds your R package (e.g., if your package is mypackage, located in
C:\working\mypackage, go to C:\working), and type
R CMD INSTALL --build mypackage
and you should have a mypackage_x.y-z.zip where x.y-z is the
version number from your DESCRIPTION file.