Hi,
I try to use grepl with rowwise and it doesn't work. Even when I use rowwise grepl takes all rows together. Small example: I want to find rows where First is in Second string:
library(dplyr)
df = data_frame(First = c("string1", "string2"), Second = c("Sentence with string1", "something"))
df %>%
rowwise() %>%
filter(grepl(First, Second, fixed = TRUE))
I got warning:
Warning message:
In grepl(c("string1", "string2"), c("Sentence with string1", "something" :
argument 'pattern' has length > 1 and only the first element will be used
Hi,
I try to use grepl with rowwise and it doesn't work. Even when I use rowwise grepl takes all rows together. Small example: I want to find rows where First is in Second string:
I got warning:
Warning message:
In grepl(c("string1", "string2"), c("Sentence with string1", "something" :
argument 'pattern' has length > 1 and only the first element will be used