[R] count id by id

Denis Kazakiewicz d.kazakiewicz at gmail.com
Tue Jan 18 23:03:11 CET 2011


Hi

Trying to work out that:
Each person can take from 1 to 9 drugs. And data frame looks like


id	drug
1	d
2	g
2	d
2	r
3	e
3	a
...........

Q: How many drugs one person takes on average? 

Thank you



More information about the R-help mailing list