From ripley at stats.ox.ac.uk  Fri Feb 11 08:56:58 2005
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri Feb 11 08:57:21 2005
Subject: [Rd] getAnywhere and functions starting with "." (PR#7684)
In-Reply-To: <20050211073557.A8A5DDEF1@slim.kubism.ku.dk>
References: <20050211073557.A8A5DDEF1@slim.kubism.ku.dk>
Message-ID: <Pine.LNX.4.61.0502110753550.4522@gannet.stats>

This was mentioned a week or so ago on R-devel and is already fixed in the 
current sources: from the NEWS file

     o	getAnywhere() was confused by names with leading or trailing dots
 	(spotted by Robert McGehee)

On Fri, 11 Feb 2005 mark.bravington@csiro.au wrote:

> Full_Name: Mark Bravington
> Version: 2.0.1
> OS: Windows XP
> Submission from: (NULL) (140.79.22.104)
>
>
> 'getAnywhere' crashes when its argument starts with a period:

It does not: it gives an error.  Please do read the comment on this in the 
posting guide!

>> getAnywhere( '.onLoad')
> Error in exists(x, envir, mode, inherits) :
>        invalid first argument
>
> One fix might be to replace the line
>
> if ( !is.null(f <- getS3method(gen, cl, TRUE))) {
>
> with
>
> if ( nchar( gen) && !is.null(f <- getS3method(gen, cl, TRUE))) {
>
> Mark
>
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,                  ripley@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] getAnywhere and functions starting with "." (PR#7684)
Prof Brian Ripley