Re: [R] looking for a string

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Mon, 14 Apr 2008 21:31:49 -0300

Try something like this:

x[grep("Jalapa", x$unidad),, drop = F]

On Mon, Apr 14, 2008 at 9:10 PM, [Ricardo Rodriguez] Your XEN ICT Team < webmaster_at_xen.net> 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 ==.
>
> Thanks!
>
> --
> Ricardo Rodríguez
> Your XEN ICT Team
>
> ______________________________________________
> R-help_at_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.
>

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

	[[alternative HTML version deleted]]


______________________________________________ R-help_at_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.

Received on Tue 15 Apr 2008 - 04:42:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Apr 2008 - 05:30:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive