Hello List,

I am trying to obtain a table containing absolute and relative frequencies but it must be done by strata. Each strata have to contain totals and subtotals being the sum of the subtotals equal to the total in upper strata in same column. As this could be some vague I am including an example of such table:


data<-data.frame(Provincial=rep(c("Prov1","Prov2","Prov1","Prov3"),10), Municipios=rep(c("Mun1","Mun2","Mun3","Mun4"),10),unit=rep(c("unit1","unit2","unit3","unit4"),10))

Variable        N       %
Province (i)
Municipalities (j)
Health units (k)
&#8721;i,  &#8721;j, &#8721;k
And so on … i = 1 to 16

&#8721;i,  &#8721;j, &#8721;k

If you could help me to obtain a function to get such table I would appreciate very much.

Best and thank you….
maicel monzon MD. MSc.



----------------------------------------------------------------




--
Este mensaje le ha llegado mediante el servicio de correo electronico que 
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema 
Nacional de Salud. La persona que envia este correo asume el compromiso de usar 
el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to