On Mon, Apr 13, 2009 at 8:56 AM, Nick Angelou nikola...@yahoo.com wrote:
data
X1 X2 X3 X4
1 1 2 2 1
2 1 1 2 2
3 1 1 2 2
4 2 2 1 2
5 1 1 2 2
6 2 2 1 2
7 1 1 2 1
8 2 2 1 2
9 1 2 1 1
10 1 1 2 2
sqldf(select X1, X2, X3, X4, count(*) CNT
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
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
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
Nick Angelou 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?
table(f1,f2,f3,f4) will give you the counts.
Other
.
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
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
this in R?
Thanks,
Nick
--
View this message in context:
http://www.nabble.com/Group-by-in-R-tp23020587p23020963.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
On Apr 13, 2009, at 7:26 AM, Nick Angelou wrote:
Thanks a lot, guys. Gabor's and Mike's suggestion worked. Duncan's
did not do
exactly what I expected (I guess it's the paste in Mike's that makes
table work as I needed it).
One more question - is there a convenient way to order the group
probably do this in SQL with a combination of OUTER JOINs
but I thought
that R might have a more elegant solution based on factor and table.
Thanks,
Nick
--
View this message in context:
http://www.nabble.com/Group-by-in-R-tp23020587p23022717.html
Sent from the R help mailing list archive
I could probably do this in SQL with a combination of OUTER JOINs
but I thought
that R might have a more elegant solution based on factor and table.
Thanks,
Nick
--
View this message in context:
http://www.nabble.com/Group-by-in-R-tp23020587p23022717.html
Sent from the R help mailing list
11 matches
Mail list logo