From ripley at stats.ox.ac.uk  Mon Nov  5 14:42:34 2007
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon, 5 Nov 2007 13:42:34 +0000 (GMT)
Subject: [Rd] namespace crash on S3method("as.ff",function)
In-Reply-To: <20071105124150.36550@gmx.net>
References: <20071105124150.36550@gmx.net>
Message-ID: <Pine.LNX.4.64.0711051335580.19513@gannet.stats.ox.ac.uk>

On Mon, 5 Nov 2007, "Jens Oehlschl?gel" wrote:

> Dear all,
>
> I have defined a generic as.ff(x, ...) and a method as.ff.function(x, ...) which converts a standard R function x into a chunked version operating on large ff objects. Everything works fine, but when registering
>
> S3method("as.ff",function)
>
> in NAMESPACE, the installation fails with some kind of parsing error:
>
>  adding build stamp to DESCRIPTION
>  installing NAMESPACE file and metadata
> Fehler in parse(nsFile) : Unerwartetes ')' bei
> 348:
> 349: S3method("as.ff",function)
> Calls: <Anonymous> -> parseNamespaceFile -> parse
> Ausf?hrung angehalten
> make[2]: *** [nmspace] Error 1
> make[1]: *** [all] Error 2
> make: *** [pkg-ff] Error 2
> *** Installation of ff failed ***
>
> Is this a bug? Any ideas?

You need to quote "function".  It falls under

   (Note that variable names may be quoted, and non-standard names such as
   @code{[<-.fractions} must be.)

since reserved words cannot be standard names.  But it could stand being 
spelt out in R-exts.

There are examples in package 'utils'.

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


[Rd] namespace crash on S3method("as.ff",function)
Prof Brian Ripley