From ripley at stats.ox.ac.uk  Sat Apr 28 16:35:54 2007
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Sat, 28 Apr 2007 15:35:54 +0100 (BST)
Subject: [Rd] pure R code package for Windows
In-Reply-To: <20070428114959.GA25723@cs.cas.cz>
References: <20070428114959.GA25723@cs.cas.cz>
Message-ID: <Pine.LNX.4.64.0704281523300.11209@gannet.stats.ox.ac.uk>

On Sat, 28 Apr 2007, Petr Savicky wrote:

> Dear R developers,
>
> I am using R under Linux, but I would like to share
> an extension package with some Windows users. The package
> contains only data and .R scripts. There is no src directory.
>
> So, I think I do not need a Windows machine with C compiler,
> "make", "sh" and "perl". If I am wrong, please tell me.
>
> I tried the following approaches (after verifying the package
> using R CMD check - 1 warning concerning the missing documentation
> for some of the R-functions.)
>
> 1. Installing the source package (with no C, C++ or F files)
>   directly on Windows XP. Installation complains that
>   "make" command is mising. OK, it is a source package.
>
> 2. Building binary package using R CMD build --binary --use-zip
>   on Linux and try to install it under Windows XP. Installation
>   complains that "make" command is missing. (Why, if it is
>   a binary package?).

How did you try to install it?  It is not a Windows binary package, but a 
Linux binary package.

> 3. Build the package from source on Windows XP using
>   R CMD build <package>. Installation complains that "sh"
>   is missing. (Why is it looking for "sh", if it is a properly
>   working R installation under Windows?)

Because you need more than R to install source packages on any platform. 
See the R-admin manual.

> 4. Install the package under Linux and zip the directory
>   library/<package> and unzip it in the library directory
>   on Windows machine. This works. The package behaves
>   correctly. However, I do not think that this is a suggested
>   method.

Well, it _is_ a suggested method: see README.packages.

Another method open to you is to cross-build on Linux, also described in 
that document and in R-admin.html.  You would need to do that is there is 
anything Windows-specific about the package.

Note that none of these methods produce Windows-specific forms of help 
(and one of those is the default). The only way to do that is under 
Windows (including using Windows tools under emulations such as Wine on 
other OSes).

-- 
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



[Rd] pure R code package for Windows
Prof Brian Ripley