[R] Convert windows package to Linux source package

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Oct 30 18:11:13 CET 2008

On Thu, 30 Oct 2008, Duncan Murdoch wrote:

> On 10/30/2008 10:50 AM, Renaud Gaujoux wrote:
>> Hi,
>> is there a simple way, I mean a utility that converts a windows package 
>> (.zip file) to a Linux source package (tar.gz or even simply extract the 
>> source code and Rd files needed to run successfully a R CMD check).
>> The windows package doesn't have any external lib, C code, etc..., just 
>> plain R code, so in theory it is quite straight forward (extract the code 
>> from the functions, and re-separate the Rd files from the man directory.
>> Any idea?
> No, no such utility exists as far as I know.  But as you say, it should be 
> relatively straightforward to write one:  the Rd files are concatenated and 
> compressed into man/pkg.Rd.gz, and the R files are concatenated into R/pkg.

Not if lazy-loading is used (and it normally is).  But what really is 
wrong with Roger Koenker's suggestion: 'unzip -a' the .zip into a library 
directory?  It will most likely work (the reverse does: zip up on Linux, 
unzip on Windows).

> You just need to watch out for comments in the files that will be mistaken 
> for separators.

I think that is safe enough in Rd files, as we process the concatenated 

> Duncan Murdoch
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list