nombre=c("Juan","Rocio","Manuel","Pedro","Carla", "Fresia","Alfredo","Teresa","Maria")
colegio=c("Guadalupe","Pitagoras","Cruz Saco","Carmelitas","Cruz Saco","Carmelitas","Guadalupe","Cruz Saco","Cruz Saco")
edad=c(22, 20, 19, 22, 21, 18, 24, 21, 23)
fueradeLima=c("SI", "NO", "SI", "NO", "NO", "SI", "NO", "NO", "NO")
sexo=c("M","F", "M", "M", "F", "F", "M", "F", "F")
universidad=c("UNMSM" ,"UNFV", "UNI", "UNI", "UNI" , "UNFV", "UNMSM", "UNMSM","UNMSM")
estad=data.frame(nombre,colegio,edad,fueradeLima,sexo,universidad,stringsAsFactors = F)
estad[estad$edad==min(estad$edad) & estad$fueradeLima=='SI',c('edad')]
## [1] 18
estad[estad$universidad=="UNMSM" & estad$colegio=="Guadalupe" & estad$edad==min(estad$edad[estad$universidad=="UNMSM" & estad$colegio=="Guadalupe"]),"sexo"]
## [1] "M"
Nombre del hombre limeño que tenga menos de 21 años.
estad[estad$sexo=="M" & estad$fueradeLima=="NO" & estad$edad<21,"nombre"]
## character(0)