[Rd] setGeneric

Roger Koenker roger at ysidro.econ.uiuc.edu
Tue Apr 1 06:18:44 MEST 2003


I'm still having difficulties with methods...is the following behavior expected?
(This is without loading any libraries)

R : Copyright 2003, The R Development Core Team
Version 1.7.0 Under development (unstable) (2003-03-31)


> ls()
character(0)
>
> diag(2)
     [,1] [,2]
[1,]    1    0
[2,]    0    1
> setGeneric("diag")
[1] "diag"
> diag(2)
Error in diag(2) : Object "n" not found
>

Seems to be a perverse consequence of some slightly fancy use of lazy evaluation....


url:	www.econ.uiuc.edu	Roger Koenker		Dept. of Economics UCL,
email	rkoenker at uiuc.edu	Department of Economics Drayton House,
vox: 	217-333-4558		University of Illinois	30 Gorden St,
fax:   	217-244-6678		Champaign, IL 61820	London,WC1H 0AX, UK
							vox:	020-7679-5838



More information about the R-devel mailing list