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

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Jun 16 15:48:00 CEST 2011


On Thu, 16 Jun 2011, Mr Rhelp wrote:

> Hi all,
>
> I am trying to re-compile some "unmaintained" (it seems) packages, namely rSoNIA
> and dynamicnetwork from:
> http://csde.washington.edu/~skyebend/rsonia/rsoniaDemo/
> These packages predates R 2.10.0 so they need to be recompile.

Well, re-installed.

> After split the single big file in /man in each packages into a file  for each
> function + some minor fix,  I successfully manage to recompile and load the
> packages

Sounds like you are doing this on Windows (please do tell us!) and 
trying to start with a Windows binary package.

> C:\BenSave\R\BuildRPackage>R CMD build --binary dynamicnetwork
> --binary is deprecated
> * checking for file 'dynamicnetwork/DESCRIPTION' ... OK
> * preparing 'dynamicnetwork':
> * checking DESCRIPTION meta-information ... OK
> * checking whether 'INDEX' is up-to-date ... OK
> * checking for LF line-endings in source and make files
> * checking for empty or unneeded directories
> * building binary distribution
> * installing *source* package 'dynamicnetwork' ...
> ** help
> *** installing help indices
> ** building package indices ...
> ** testing if installed package can be loaded
>     Classes for Relational Data
> Version      1.6 created on      January 28, 2011.
> copyright (c) 2005, Carter T. Butts, University of California-Irvine
>                    Mark S. Handcock, University of Washington
>                    David R. Hunter, Penn State University
>                    Martina Morris, University of Washington
> For citation information, type citation("network").
> Type help("network-package") to get started.
> * MD5 sums
> packaged installation of 'dynamicnetwork' as dynamicnetwork_0.0-4.zip
>
> * DONE (dynamicnetwork)
>
> I then tried to run the main example, but it seems no function has been built
> (The help for these function is working for some reason).
>
>> fauxDyn <- as.dynamic(fauxSim20, check.renewal=FALSE);

Is that supposed to be R code?  R code lines don't end in semicolons.

> Error: could not find function "as.dynamic"
>
>> launchSonia(fauxDyn);
>
> Error: could not find function "launchSonia"
>
> Is there a HOWTO/porting guide for packages pre R 2.10.0 to post R 2.10.0?

You don't need one.  You start with the package sources, and install 
those.  If you don't have the sources, you ask the author for the 
sources.  But on the page you mention, I see

'unix/macs use the  *.tar.gz version'

by which they mean 'the source package'.

(Note that for GPLed packages such as this one, the sources must be 
made available.)

There are some errors in the format of the Rd files, but both packages 
install in R 2.13.0.  However, you are supposed to get Java components 
from a site which no longer exists, so I think you are going to need 
to ask the author for help.

One advantage of recent R is that to install packages like these from 
the sources you just need R, so there is no reason to distribute 
Windows binary packages (for such packages, with no C/C++/Fortran 
code).

> I have tried googling for it but I must be looking at the wrong place.
>
> What about "--binary is deprecated"? What is the correct way now?

R CMD INSTALL --build is preferred (and always has been on Windows).

But why are you trying to build a binary package before you even have 
it working?  Binary packages are really only useful for 
redistribution.

> Thanks in advance,
>
> Ben

Surname 'Rhelp'

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