On Jan 6, 2011, at 13:11 , Kenn Konstabel wrote:
> the following seems an easy solution:
>
> f1 <- function(mod){
> subs <- 1:10
> toeval <- quote(update(mod, subset=subs))
> toeval$subset<-subs
> eval(toeval)
> }
>
> f1(mod.2)
Tere, Kenn!
Yes, enforcing pass-by-value by p
the following seems an easy solution:
f1 <- function(mod){
subs <- 1:10
toeval <- quote(update(mod, subset=subs))
toeval$subset<-subs
eval(toeval)
}
f1(mod.2)
When experimenting with this I once had (by mistake):
mod.2 <- lm(update(mod.1, . ~ . - Year + Year)) # instead
t;
> >
> >> -Original Message-
> >> From: r-devel-boun...@r-project.org
[mailto:r-devel-boun...@r-project.org]
> > On
> >> Behalf Of Gabor Grothendieck
> >> Sent: January-04-11 6:56 PM
> >> To: John Fox
> >> Cc: Sanford Weisber
gt; Hamilton, Ontario, Canada
> web: socserv.mcmaster.ca/jfox
>
>
>> -Original Message-
>> From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org]
> On
>> Behalf Of Gabor Grothendieck
>> Sent: January-04-11 6:56 PM
>> To: John
ehalf Of Gabor Grothendieck
> Sent: January-04-11 6:56 PM
> To: John Fox
> Cc: Sanford Weisberg; r-devel@r-project.org
> Subject: Re: [Rd] scoping/non-standard evaluation issue
>
> On Tue, Jan 4, 2011 at 4:35 PM, John Fox wrote:
> > Dear r-devel list members,
> >
> > O
a
web: socserv.mcmaster.ca/jfox
> -Original Message-
> From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org]
On
> Behalf Of peter dalgaard
> Sent: January-04-11 6:05 PM
> To: John Fox
> Cc: 'Sanford Weisberg'; r-devel@r-project.org
> Su
On Tue, Jan 4, 2011 at 4:35 PM, John Fox wrote:
> Dear r-devel list members,
>
> On a couple of occasions I've encountered the issue illustrated by the
> following examples:
>
> - snip ---
>
>> mod.1 <- lm(Employed ~ GNP.deflator + GNP + Unemployed +
> + Armed.Forces + Popu
On Jan 4, 2011, at 22:35 , John Fox wrote:
> Dear r-devel list members,
>
> On a couple of occasions I've encountered the issue illustrated by the
> following examples:
>
> - snip ---
>
>> mod.1 <- lm(Employed ~ GNP.deflator + GNP + Unemployed +
> + Armed.Forces + Popu
Dear all,
A small correction: I had a stray line in my f2(),
env <- new.env(parent=.GlobalEnv)
left over from yet another attempt; it can simply be removed.
Sorry for the confusion,
John
John Fox
Senator William McMaster
Professor of Social Statisti