Skip to content
Prev 360592 / 398503 Next

how to use AND in grepl

Thanks Peter, you were right, the exact grepl is grepl("(.*t2.*pd.*)|(.*pd.*t2.*)",df$Command), but it does not change anything in Command, when I check the size of it by sum(grepl("(.*t2.*pd.*)|(.*pd.*t2.*)",df$Command))  the result is 0, but I am sure that the size is not 0. It seems that this AND does not work.
On Monday, May 2, 2016 5:05 AM, peter dalgaard <pdalgd at gmail.com> wrote:

        
On 02 May 2016, at 12:43 , ch.elahe via R-help <r-help at r-project.org> wrote:

            
Tom's code was missing a ")" but not where you put one. He probably also didn't intend to capitalize "subset".


-pd