-----Original Message-----
From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk]
Sent: 30 July 2003 13:00
To: Marsland, John
Cc: 'r-help at lists.R-project.org'
Subject: Re: [R] building packages using S4 methods
On Wed, 30 Jul 2003, Marsland, John wrote:
I have been building a package around a sequence of S4
coded in separate *.R files in the "./R" subdirectory of
The package builds without error, but when I load it in R I get:
[Incidentally, packages with R syntax errors `build without
errors': that
is not a useful test.]
Error in reconcilePropertiesAndPrototype(name, slots, prototype,
superClasses) :
Class "xxxx" extends an undefined class ("yyyyyy"
I guess R is trying to source the *.R files in the wrong
order? Since both
Or perhaps you didn't give them names in the right order?
The files are
not in fact source-d, but they are concatenated in
alphabetical order and
the concatenated file is parsed and evaluated (at load time
unless you
used --save: see below).
`alphabetical order' is potentially locale-dependent,
although we try to
ensure that the C locale is used, I don't think this is bound
to work on
Windows.
classes are defined in the package and work fine at the
Is it just that this has not been an issue before owing to R's lazy
evaluation?
Is there anything I can do about this... maybe by putting
How are you building the package? Are you using --save? If
not, that is
probably the solution as it is highly recommended for
packages using S4
classes.
--
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