[R] table

maicel at infomed.sld.cu maicel at infomed.sld.cu
Mon Mar 2 21:31:50 CET 2015


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)
∑i,  ∑j, ∑k
And so on 
 i = 1 to 16

∑i,  ∑j, ∑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/



More information about the R-help mailing list