Erich Neuwirth wrote:
>>Try do.call like this:
>>
>>ff <- x ~ g*h
>>do.call("substitute", list(ff, list(x = as.name("weight"
>>
>
>
> It is even more complicated.
> All I know is that ff is a formula with an expression on the left hand
> side. This expression needs to be replaced by "weights"
> Try do.call like this:
>
> ff <- x ~ g*h
> do.call("substitute", list(ff, list(x = as.name("weight"
>
It is even more complicated.
All I know is that ff is a formula with an expression on the left hand
side. This expression needs to be replaced by "weights".
According to the documentation,
On 8/22/05, Erich Neuwirth <[EMAIL PROTECTED]> wrote:
> >
> >>(foo <- eval(substitute(x ~ g * h, list(x = as.name("weights")
> >
> > weights ~ g * h
> >
> >>class(foo)
> >
> > [1] "formula"
> >
> >
>
> ff<-formula("x~g*h")
> (foo<-eval(substitute(ff,list(x=as.name("weights")
>
> gives
>
>
>>(foo <- eval(substitute(x ~ g * h, list(x = as.name("weights")
>
> weights ~ g * h
>
>>class(foo)
>
> [1] "formula"
>
>
ff<-formula("x~g*h")
(foo<-eval(substitute(ff,list(x=as.name("weights")
gives
x ~ g * h
what needs to be done to ff for the substitution to work?
I fo
On 8/22/05, Erich Neuwirth <[EMAIL PROTECTED]> wrote:
> I am trying to adapt boxplot.formula (in graphics) to accept an
> additional parameter, weights.
> I already managed to adapt boxplot.default to do this.
>
> boxplot.formula prepares the data for a call to boxplot.default and to
> achieve tha
I am trying to adapt boxplot.formula (in graphics) to accept an
additional parameter, weights.
I already managed to adapt boxplot.default to do this.
boxplot.formula prepares the data for a call to boxplot.default and to
achieve that does the following: It takes a formula like
x~g*h
as the f