[R] User package - Simple Ports

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Tue Nov 16 17:30:10 CET 2004



Keith J Sabol wrote:

> R experts,
> 
> I created a package X for R 1.8 that I want to re-install for 2.0.1.  In
> addition to downloading/installing Perl and Rtools as directed in the
> README.packages file and ensuring that they appear in my path, I have
> modified X's DESCRIPTION file to include all required fields.
> Additionally I have deleted  the "built" line since the  make process
> will add that.  The source contains no Fortran/C/C++ and resides in   .
> R/rw2000/src/library
> 
>  
> 
>>From .R/rw2000/src/gnuwin32>  make X -X seems to run the make utility,
> but the package is never installed.
> 
>  
> 
> In R 1.8  manually added the build line and copied the package directory
> into the library tree and library(X) worked without a formal install (As
> you would guess this was a work-around for my earlier and evidently
> persistent lack of success in my package installation endeavors.).  The
> same work-around approach seems not to work with 2.0.
> 
>  

Keith,

Have you read "Writing R Extensions" that comes with each R 
distribution? In it you will see that to CHECK/BUILD/INSTALL packages 
you need to use R CMD. As in

 > R CMD CHECK X
<snip check messages>
 > R CMD INSTALL X
<snip install messages>
 > R CMD BUILD X # to build the package into X_<version>.tar.gz
<snip build messages>
 > R CMD BUILD --binary X # to compile the package into X_<version>.zip
<snip build messages>

This is no different from the 1.8.x way of building packages on Windows 
except I think back then Rcmd was the equivalent of R CMD.

My version of R is currently R-2.0.0patched on Windows 2000.

--sundar




More information about the R-help mailing list