Re: [R] Does SQL group by have a heavy duty equivalent in R

From: Farrel Buchinsky <>
Date: Mon 01 Jan 2007 - 00:43:44 GMT

The reason that I used the as.matrix is because I understood that everything in the data.frame had to be either numeric or character. Most of mine were factors.
Thank you so much for finding my elusive spelling mistake. I removed the offending "d" from "measured" and now it works. However, I have run into a different sort of a problem and appreciated the error message but it is not leading me to the solution.
> casted<-cast(melted,SAMPLE_ID+ASSAY_ID~GENOTYPE_ID)
Error in check_formula(formula, varnames) :

        Formula contains variables not in list of known variables

yet look at this

On 12/31/06, hadley wickham <> wrote:
> > I converted the whole data frame to character by using
> > as.matrix
> You shouldn't need to do that.
> > And then using a posting that explained how to get the naming
> conventions
> > back (which had been lost when converting to matrix)
> >
> > Anything that I did not list with the id's it insisted in including them
> > with the measured variables. In other words it would not let me drop.
> >
> > despite
> >
> > melted<-melt(BigDF, id=c("SAMPLE_ID","ASSAY_ID"),
> > measured=c("GENOTYPE_ID","DESCRIPTION"))
> That should be measure=c(...)
> Hadley

Farrel Buchinsky
Mobile: (412) 779-1073

	[[alternative HTML version deleted]]

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Mon Jan 01 11:46:16 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 01 Jan 2007 - 01:30:24 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.