[Rd] setGeneric() gives "must supply skeleton" when checking package
mtmorgan at fhcrc.org
Sun Feb 3 18:41:11 CET 2013
On 02/03/2013 09:36 AM, Martin Morgan wrote:
> On 02/02/2013 02:34 PM, Tim Bergsma wrote:
>> In a development version of the CRAN package metrumrg, I write ...
>> setMethod('cast','keyed', function ...)
>> The result is satisfactory when sourcing the code directly, but when
>> checking the package (which has 'reshape' as a dependency in the
>> DESCRIPTION file) I get the following:
>> "Error in setGeneric("cast") : must supply a function skeleton for
>> ???cast???, explicitly or via an existing function."
> You haven't mentioned your DESCRIPTION or NAMEPSACE file, but the right thing to
> do is
> Depends: reshape
Should be Imports: reshape
> importFrom(reshape, cast)
> Perhaps your current setGeneric is being performed inside the namespace when
> cast is not yet available (e.g., because it has not been imported)?
> Martin Morgan
>> The help for setGeneric() seems to suggest that no function skeleton is
>> needed when creating a generic for a function defined in some other
>> package. I found one or two previous related posts, but no obvious
>> Comments appreciated,
>> Tim Bergsma, PhD
>> [[alternative HTML version deleted]]
>> R-devel at r-project.org mailing list
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109
Location: Arnold Building M1 B861
Phone: (206) 667-2793
More information about the R-devel