From roger at ysidro.econ.uiuc.edu  Tue Apr  1 06:18:44 2003
From: roger at ysidro.econ.uiuc.edu (Roger Koenker)
Date: Tue Apr  1 13:13:39 2003
Subject: [Rd] setGeneric
In-Reply-To: <200304011015.h31AEd2w012474@hypatia.math.ethz.ch>
Message-ID: <Pine.SOL.4.30.0304010505550.24055-100000@ysidro.econ.uiuc.edu>

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


[Rd] setGeneric
Roger Koenker