Re: [Rd] formula(CO2)

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Mon, 16 Jul 2007 11:18:37 -0400

Yes. That's what I was referring to.

On 7/16/07, Ted Harding <ted.harding_at_nessie.mcc.ac.uk> wrote:
> On 16-Jul-07 14:42:19, Gabor Grothendieck wrote:
> > Note that the formula uptake ~. will do the same thing so its
> > not clear how useful this facility really is.
>
> Hmmm... Do you mean somthing like
>
> lm(uptake ~ . , data=CO2[,i])
>
> where i is a subset of (1:4) as in my code below? In which case
> I agree!
>
> Ted.
>
>
> >
> > On 7/16/07, Ted Harding <ted.harding_at_nessie.mcc.ac.uk> wrote:
> >> On 16-Jul-07 14:16:10, Gabor Grothendieck wrote:
> >> > Following up on your comments it seems formula.data.frame just
> >> > creates
> >> > a formula whose lhs is the first column name and whose rhs is made
> >> > up
> >> > of the remaining column names. It ignores the "formula" attribute.
> >> >
> >> > In fact, CO2 does have a formula attribute but its not extracted by
> >> > formula.data.frame:
> >> >
> >> >> CO2_at_formula
> >> > uptake ~ conc | Plant
> >> >> formula(CO2)
> >> > Plant ~ Type + Treatment + conc + uptake
> >>
> >> Indeed! And, following up yet again on my own follow-up comment:
> >>
> >> library(combinat)
> >>
> >> for(j in (1:4)){
> >> for(i in combn((1:4),j,simplify=FALSE)){
> >> print(formula(CO2[,c(5,i)]))
> >> }
> >> }
> >> uptake ~ Plant
> >> uptake ~ Type
> >> uptake ~ Treatment
> >> uptake ~ conc
> >> uptake ~ Plant + Type
> >> uptake ~ Plant + Treatment
> >> uptake ~ Plant + conc
> >> uptake ~ Type + Treatment
> >> uptake ~ Type + conc
> >> uptake ~ Treatment + conc
> >> uptake ~ Plant + Type + Treatment
> >> uptake ~ Plant + Type + conc
> >> uptake ~ Plant + Treatment + conc
> >> uptake ~ Type + Treatment + conc
> >> uptake ~ Plant + Type + Treatment + conc
> >>
> >> opening the door to automated fitting of all possible models
> >> (without interactions)!
> >>
> >> Now if only I could find out how to do the interactions as well,
> >> I would never need to think again!
> >>
> >> best wishes,
> >> Ted.
> >>
> >> --------------------------------------------------------------------
> >> E-Mail: (Ted Harding) <ted.harding_at_nessie.mcc.ac.uk>
> >> Fax-to-email: +44 (0)870 094 0861
> >> Date: 16-Jul-07 Time: 15:40:36
> >> ------------------------------ XFMail ------------------------------
> >>
> >
> > ______________________________________________
> > R-devel_at_r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
>
> --------------------------------------------------------------------
> E-Mail: (Ted Harding) <ted.harding_at_nessie.mcc.ac.uk>
> Fax-to-email: +44 (0)870 094 0861
> Date: 16-Jul-07 Time: 16:13:15
> ------------------------------ XFMail ------------------------------
>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 16 Jul 2007 - 16:29:14 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 16 Jul 2007 - 17:36:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.