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

From: Farrel Buchinsky <fjbuch_at_gmail.com>
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
 unique(melted$variable)
[1] GENOTYPE_ID DESCRIPTION
Levels: GENOTYPE_ID DESCRIPTION

On 12/31/06, hadley wickham <h.wickham@gmail.com> 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]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.