Re: [Rd] NAMESPACE problems

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed, 03 Aug 2011 06:34:26 +0100 (BST)

On Wed, 3 Aug 2011, robin hankin wrote:

> Hi.
>
> I am having difficulty following section 1.6.6 of the R-extensions manual.

Also in following the posting guide: which version of R is this (it matters here!)?

It seems you are failing to import the functions you are attempting to take over as S4 generics: most likely plot() so you need

importFrom(graphics, plot)

at least in R 2.13.x.

>
> I am trying to update the Brobdingnag package to include a NAMESPACE file (the
> untb package requires the Brobdingnag package).
>
> Without the NAMESPACE file, the package passes R CMD check cleanly.
>
> However, if I include a NAMESPACE file, even an empty one, R CMD check
> gives the following error in 00install.out:
>
>
>
> wt118:~/packages% cat Brobdingnag.Rcheck/00install.out
> * installing *source* package ‘Brobdingnag’ ...
> ** R
> ** inst
> ** preparing package for lazy loading
> Creating a generic for ‘max’ in package ‘Brobdingnag’
> (the supplied definition differs from and overrides the implicit generic
> in package ‘base’: Classes: "nonstandardGenericFunction", "standardGeneric")
> Creating a generic for ‘min’ in package ‘Brobdingnag’
> (the supplied definition differs from and overrides the implicit generic
> in package ‘base’: Classes: "nonstandardGenericFunction", "standardGeneric")
> Creating a generic for ‘range’ in package ‘Brobdingnag’
> (the supplied definition differs from and overrides the implicit generic
> in package ‘base’: Classes: "nonstandardGenericFunction", "standardGeneric")
> Creating a generic for ‘prod’ in package ‘Brobdingnag’
> (the supplied definition differs from and overrides the implicit generic
> in package ‘base’: Classes: "nonstandardGenericFunction", "standardGeneric")
> Creating a generic for ‘sum’ in package ‘Brobdingnag’
> (the supplied definition differs from and overrides the implicit generic
> in package ‘base’: Classes: "nonstandardGenericFunction", "standardGeneric")
> Error in setGeneric(f, where = where) :
> must supply a function skeleton, explicitly or via an existing function
> Error : unable to load R code in package 'Brobdingnag'
> ERROR: lazy loading failed for package ‘Brobdingnag’
> * removing ‘/Users/rksh/packages/Brobdingnag.Rcheck/Brobdingnag’
> wt118:~/packages%
>
>
> AFAICS, all the setGeneric() calls are pretty much like this:
>
> setGeneric("getX",function(x){standardGeneric("getX")})
>
>
>
> Can anyone advise?
>
>
> thank you
>
> Robin
>
>
> --
> Robin Hankin
> Uncertainty Analyst
> hankin.robin_at_gmail.com
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

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


______________________________________________ R-devel_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Received on Wed 03 Aug 2011 - 05:36:42 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 03 Aug 2011 - 07:40:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive