Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rowwise doesn't work with grepl #1099

pwalaszek opened this issue Apr 23, 2015 · 1 comment

Rowwise doesn't work with grepl #1099

pwalaszek opened this issue Apr 23, 2015 · 1 comment


Copy link

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:

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

@romainfrancois romainfrancois self-assigned this Apr 24, 2015
Copy link

Actually filter does not know at all about rowwise and treats the data as if it was not rowwised.

@hadley hadley added this to the 0.5 milestone May 19, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jun 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
None yet

No branches or pull requests

3 participants