[R] Porting "unmaintained" packages to post R 2.10.0 era

Uwe Ligges ligges at statistik.tu-dortmund.de
Fri Jun 17 16:57:52 CEST 2011



On 17.06.2011 14:39, Stephen Ellison wrote:
>
>
>> -----Original Message-----
>> From: r-help-bounces at r-project.org
>> [mailto:r-help-bounces at r-project.org] On Behalf Of Uwe Ligges
>> Sent: 17 June 2011 12:04
>>>> See the manual. It tells  you
>>>>
>>>> R CMD INSTALL --build
>>>>
>>>> will generate a binary  package.
>>>
> ...
>>> it seems I am not the only one to make this mistake:
>
>>
>> We know, and we always ask people to read the recent official
>> manuals where this is mentioned rather than any outdated material.
>>
>
> I appreciate that one is expected to read the manuals, but having re-read the current docs I can only say that this information remains very well buried.
>
> Section 1.3 of 'Checking and building packages'  in the present versions of 'Writing R extensions' starts with the clear statement "Using R CMD build, the R package builder, one can build R packages from their sources (for example, for subsequent release). "
> This tells every package builder that R CMD BUILD is the appropriate route. There is no qualifying statement here such as 'For .tar.gz source packages... ' or 'except for zipped binaries which should now be built using R CMD INSTALL (see below).' And the entire section but for one line describes the use of R CMD build.
>
> The one line in that manual that indicates that R CMD INSTALL is preferred simply states that "R CMD build can also build pre-compiled version of packages for binary distributions, but it is now deprecated in favour of R CMD INSTALL --build.". But here, no information is given on what the side effects are. For example, it would be reasonable to assume that INSTALL would install the package on one's own system, and if one does not intend that it is not at all clear what one should do instead. To find the side effects, one has to delve into Installation and Administration.
>
> But while R Installation and administration mentions the INSTALL --build option, it is under the section "Checking installed source packages" and not under 'Installing..." or "Building...". Why would a package developer look there at all? They aren't checking an installed package yet. And in that section, it is clear that R CMD INSTALL --build is intended to _install check and package for distribution_ a package. A prudent package developer should surely not want to do all that in one go; they will want to check the package using check, build without affecting their current system once the check passes and then, if the builds are also successful, check - perhaps by installing from the console - that the binary and tar.gz install properly on a system that does not already include the package. That careful stepwise process is apparently not supported in the documentation under 'checking installed packages' so it's easy to see why a developer would not see this section as rel
evant even if they had thought to look under a section that seems irrelevant to package building.
>
> So while I have every sympathy with R Core being frustrated that users don;t read manuals, I do rather think some clearer pointers could be given as to where in the manual to look and what to do if one does NOT want to install an untested package one one's own live system every time a distribution build is desired. Perhaps this has been sorted in the devel tree for 2.14, though?


You can install to any library, even a temporary one that does not need 
to be in .libPaths() of your regular R installation. So you won't do any 
harm to your sytsem.

Why do you want to build a binary before checking? You only need a 
binary in order to distribute it, and I doubt you want to do that before 
you checked the package.

Best,
Uwe



>
> S Ellison
>
>
>
>> Best,
>> Uwe Ligges
>>
>>
>>> Cheers,
>>>
>>> Ben
>>
>> ______________________________________________
>> 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.
>> *******************************************************************
> This email and any attachments are confidential. Any u...{{dropped:8}}



More information about the R-help mailing list