strings[-grep("ba",strings)]

--- On Thu, 19/6/08, Daren Tan <[EMAIL PROTECTED]> wrote:

> From: Daren Tan <[EMAIL PROTECTED]>
> Subject: [R] Any simple way to subset a vector of strings that do contain a 
> particular substring ?
> To: [EMAIL PROTECTED]
> Received: Thursday, 19 June, 2008, 3:18 PM
> For example, 
>  
> strings <- c("aaaa",
> "bbbb","ccba"). 
>  
> How to get "aaaa", "bbbb" that do not
> contain "ba" ?
> _________________________________________________________________
> 
> 
>       [[alternative HTML version deleted]]
> 
> ______________________________________________
> 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.

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

Reply via email to