Thanks! Here what I get: Henrique Dallazuanna wrote: > Try something like this: > > x[grep("Jalapa", x$unidad),, drop = F] > > conaguaMexicoSub <- subset(conagua, unidad == x[grep("Jalapa", x$unidad),, drop = F], select = c(equipo,X101:X309))
Error en x$unidad : $ operator is invalid for atomic vectors Please, is the expression you proposed to pass directly to unidad == ? I am afraid that I didn't expect that it will be so hard to find an alternative to DOS wildcards! Thanks for your help, Ricardo -- Ricardo RodrÃguez Your XEN ICT Team ______________________________________________ R-help@r-project.org mailing list 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.