Está en la página 1de 1

Mor15 <-

read.table("C:/Users/igor0674/Dropbox/01 (A) IM-UNAM-Cuernavaca/Pobreza/03


Intercensal2015/17_morelos/TR_PERSONA17.CSV",
header=TRUE, sep=",", na.strings="NA", dec=".", strip.white=TRUE)

summary.factor(Mor15$NOM_MUN)

edades<-with(Mor15, tapply(EDAD, list(NOM_MUN), mean, na.rm=TRUE))

s.d<.with(Mor15, tapply(EDAD, list(NOM_MUN), sd, na.rm=TRUE))

cuerna<-Mor15[ Mor15$EDAD>18 & Mor15$EDAD<=30 & Mor15$NOM_MUN=="Cuernavaca",]

cambia.seg<-function(x){
if ( x==1) {
x<-"Seg.Pop"
} else if ( x==2) {
x<-"IMSS"
} else if ( x==3) {
x<-"ISSSTE"
} else if ( x==4) {
x<-"ISSSTE.Est"
} else if ( x==5) {
x<-"PEMEX"
} else if ( x==6) {
x<-"Priv"
} else if ( x==7) {
x<-"farmacia"
} else if (x==8) {
x<-"otro"
} else
x<-"No.Sabe"
return(x)}

##################################################################
1. En donde hay mas jovenes y personas grandes
2. Porcentaje de hombres y mujeres
3. Porcentaje de habla lengua indigena
4. Histograma de tiempo de traslado a la escuela. Cuerna, Juitepec, Temixco,
Cuautla
5. Histo por tipo de transporte en Cuerna
6. Histo de nivel escolaridad

Mor15<-sapply(Mor15, cambia.seg)

También podría gustarte