On Tue, 15 Apr 2008, [Ricardo Rodriguez] Your XEN ICT Team wrote:
Hi all, I have not been able to find an answer to what is a simple question: conaguaMexicoSub <- subset(conagua, unidad == "Jalapa", select = c(equipo,X101:X309)) This subset gives me all the rows from conagua where unidad is Jalapa. But, please, how do I get all the rows where unidad contents Jalapa? I've been looking at regex, but I didn't find how pass one to unidad ==.
You want ?regexpr Something like regexpr("Jalapa", as.character( unidad ) ) != -1 HTH, Chuck
Thanks! -- 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.
Charles C. Berry (858) 534-2098 Dept of Family/Preventive Medicine E mailto:[EMAIL PROTECTED] UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
______________________________________________ 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.