[R] how to simplify a table

Simone Gabbriellini simone.gabbriellini at gmail.com
Tue Jul 6 12:49:03 CEST 2010


Hello List,

as a result of a table(), I have this:

 0  1   3  4  5  6  7  9 11 12 13 14 16 17 18 19 20 21 22 24 27 28
27  2  2  2  2  2  1  2  1   3   2   1   2  1   1   3  1   1   1   2  1   1

I would like to simplify it by grouping like:

0   0-5 6-10 11-15 16-20 21-25 26-30
25  8    4       7        8       4       2

is it possible? could someone point me to the right function to do this?

best regards,
Simone



More information about the R-help mailing list