grepl with loop in R -


saw posts around general expression if 'value' contains 'char' how can done on length vector?

    v1 <- c('123','456','789','4433','77666')     v2 <- c('9999','9998','91239','9987','8877666','789','100') 

but when function want return ('t','f','t','f','t')

    df<-0     for(i in 1:length(v1))     {     for(j in 1:length(v2))     df[i]<-grepl(i,j)     } 

any appreciated - thanks!


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -