[R] Simple table with frequency variable

G. Draisma g.draisma at erasmusmc.nl
Wed Aug 1 13:49:29 CEST 2007


Hallo,

Im trying to find out how to tabulate frequencies
of factors when the data have a frequency variable.

e,g:
i<-rep(1:5,2)
j<-rep(1:2,5)
N<-10*i+j

table(i,j) gives a table of ones
as each combination occurs only once.
How does one get a table with the corresponding N's?

Thanks!
Gerrit.


-- 
Gerrit Draisma
Department of Public Health
Erasmus MC, University Medical Center Rotterdam
Room AE-103
P.O. Box 2040 3000 CA  Rotterdam The Netherlands
Phone: +31 10 4087124 Fax: +31 10 4638474
http://mgzlx4.erasmusmc.nl/pwp/?gdraisma



More information about the R-help mailing list