Skip to content
Prev 263320 / 398502 Next

ddply to count frequency of combinations

But look at str(tab.df) - x and y are now factors (or characters).  I
wrote count to avoid this problem.

Also compare:

table(mtcars)
# Error in table(mtcars) : attempt to make a table with >= 2^31 elements

count(mtcars)
#     mpg cyl  disp  hp drat    wt  qsec vs am gear carb freq
# 1  10.4   8 460.0 215 3.00 5.424 17.82  0  0    3    4    1
# 2  10.4   8 472.0 205 2.93 5.250 17.98  0  0    3    4    1
# ...

Hadley