From Mark.Bravington at csiro.au  Tue Aug  5 02:29:26 2003
From: Mark.Bravington at csiro.au (Mark.Bravington@csiro.au)
Date: Tue Aug  5 01:29:16 2003
Subject: [Rd] (PR#3658)
Message-ID: <200308042329.h74NTQJH007314@pubhealth.ku.dk>

The function 'getAnywhere' crashes if given a non-existent name containing a period:

> getAnywhere( 'nomethod.noclassforme')
Error in get(x, envir, mode, inherits) : variable "nomethod" was not found

However, 'getAnywhere' behaves gracefully if the non-existent name lacks a period:

> getAnywhere( 'nomethod')
no object named `nomethod' was found

the latter being an object of class 'getAnywhere'.

The cause is actually in getS3method which isn't respecting the 'optional=TRUE' argument when it can't find any function to match its first argument. Whether this is strictly a bug in getS3method, I'm not sure-- but the side-effect in getAnywhere seems undesirable.

Mark




--please do not edit the information below--

Version:
 platform = i386-pc-mingw32
 arch = i386
 os = mingw32
 system = i386, mingw32
 status = 
 major = 1
 minor = 7.1
 year = 2003
 month = 06
 day = 16
 language = R

Windows 2000 Professional (build 2195) Service Pack 3.0

Search Path:
 .GlobalEnv, package:methods, package:ctest, package:mva, package:modreg, package:nls, package:ts, package:handy, package:debug, mvb.session.info, package:mvbutils, package:tcltk, Autoloads, package:base

*******************************

Mark Bravington
CSIRO (CMIS)
PO Box 1538
Castray Esplanade
Hobart
TAS 7001

phone (61) 3 6232 5118
fax (61) 3 6232 5012
Mark.Bravington@csiro.au


[Rd] (PR#3658)
Mark.Bravington@csiro.au