Re: S Compatibility (Was: Re: R-beta: 'all.names' function -- failing as.list( _function_ ))

Thomas Lumley (
Tue, 29 Apr 1997 16:28:55 -0700 (PDT)

Date: Tue, 29 Apr 1997 16:28:55 -0700 (PDT)
From: Thomas Lumley <>
To: Ross Ihaka <>
Subject: Re: S Compatibility (Was: Re: R-beta: 'all.names' function -- failing   as.list( _function_ ))
In-Reply-To: <>

On Wed, 30 Apr 1997, Ross Ihaka wrote:
> Some things we almost certainly won't be changing.  Scoping is one of
> these (although I have to confess that I have made the pitch to Robert
> that we should drop our scoping in favour of the S version - he
> sensibly said "no").

Quite right too.  My favorite example is a function that I and several of
my fellow students have at various times tried to write in S.

	var(t(apply(ii,1,function(i) update(lm.obj,subset=-i)$coef)))

or similar things for bootstrap, weighted bootstrap, glms and so on.  In
every case people have spent hours staring at this code and wondering why
it claims to be unable to find lm.obj. 

My view on the scoping rules of R is that they aren't an incompatibility
since most people I have talked to think that S scopes this way.

Thomas Lumley
Biostatistics		: "Never attribute to malice what  :
Uni of Washington	:  can be adequately explained by  :
Box 357232		:  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232	:				   :

r-help mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: