You can use SQL commands directly on R data frames with the R sqldf package: See home page:
http://sqldf.googlecode.com On Mon, Apr 13, 2009 at 6:33 AM, Nick Angelou <nikola...@yahoo.com> wrote: > > Hi, > > I have the following table data: > > f1, f2, f3, f4. > > I want to compute the counts of unique combinations of f1-f4. In SQL I would > just write: > > SELECT COUNT(*) FROM <table> GROUP BY f1, f2, ..,f4. > > How to do this in R? > > Thanks, > > Nick > -- > View this message in context: > http://www.nabble.com/Group-by-in-R-tp23020587p23020587.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org 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. > ______________________________________________ R-help@r-project.org 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.