[R] count - help

Dieter Menne dieter.menne at menne-biomed.de
Wed Jul 14 15:39:33 CEST 2010



barbara horta e costa wrote:
> 
> I have a data frame with several factors and I want to count the
> occurrences
> of an event resulting from an interaction of some factors.
> 
> I'd only need a table as excel does with pivot table and summarize data as
> count
> 

"Only" what pivot tables does: Pivot tables are one of the best features of
Excel, and it's not always that easy in R. Hadley Wickham who has written
the "reshape" package, admitted that he tried to mimic pivot tables in R;
the fact that the has not been ripped into piece because of this confession
tells a lot.

Anyway: give package reshape a try; it comes with a nice tutorial. And if
you have more questions, try to construct a very simple example (3 lines!)
that runs out of the box and shows your problem. I assume that merge (which
does something like SQL join) is not what you need, but I am not sure

Dieter


-- 
View this message in context: http://r.789695.n4.nabble.com/count-help-tp2288571p2288764.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list