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

2007-01-02 Thread BBands
On 1/1/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: And it works perfectly well with RODBC, so you don't need yet another package. RODBC even comes with SQLite examples. Thanks, I hadn't thought of that and it should simplify things as we are already using RODBC for MySQL. BTW, 'fast' is

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

2007-01-01 Thread BBands
On 12/30/06, Farrel Buchinsky [EMAIL PROTECTED] wrote: Instead I used RODBC sqlSave(channel,RawSeq) to push the table into a Microsoft Access database Then a sql query, courtesy of the Microsoft Access Query Wizard a la design mode. If SQL does prove to be part of your approach you might

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

2007-01-01 Thread Farrel Buchinsky
Absolutely wonderful. Yes indeed, instead of having two variables being listed as group by in a sql statement one can use a combination of cbind, unique, duplicated and indexing to get the same data without having to go through second programs. [[alternative HTML version deleted]]

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

2007-01-01 Thread Prof Brian Ripley
On Mon, 1 Jan 2007, BBands wrote: On 12/30/06, Farrel Buchinsky [EMAIL PROTECTED] wrote: Instead I used RODBC sqlSave(channel,RawSeq) to push the table into a Microsoft Access database Then a sql query, courtesy of the Microsoft Access Query Wizard a la design mode. If SQL does prove to

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

2006-12-31 Thread hadley wickham
nr.attempts -aggregate(RawSeq$GENOTYPE_ID,list(sample=RawSeq$SAMPLE_ID,assay=RawSeq$ASSAY_ID),length) This was simply to figure out how many times the same piece of information had been obtained. I ran out of patience. It took beyond forever and tapply did not perform much better. The reshape

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

2006-12-31 Thread Farrel Buchinsky
I converted the whole data frame to character by using as.matrix 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.

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

2006-12-31 Thread hadley wickham
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

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

2006-12-31 Thread Farrel Buchinsky
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

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

2006-12-31 Thread Charles C. Berry
On Sun, 31 Dec 2006, Farrel Buchinsky wrote: I have hundreds of humans who have undergone SNP genotyping at hundreds of loci. Some have even undergone the procedure twice or thrice (kind of an internal control). So obviously I need to find those replications, and confirm that the results

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

2006-12-31 Thread Charles C. Berry
On Sun, 31 Dec 2006, Charles C. Berry wrote: On Sun, 31 Dec 2006, Farrel Buchinsky wrote: I have hundreds of humans who have undergone SNP genotyping at hundreds of loci. Some have even undergone the procedure twice or thrice (kind of an internal control). So obviously I need to find

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

2006-12-30 Thread Farrel Buchinsky
I have hundreds of humans who have undergone SNP genotyping at hundreds of loci. Some have even undergone the procedure twice or thrice (kind of an internal control). So obviously I need to find those replications, and confirm that the results are the same. If there is discordance then I need to