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

error when using rlang 0.3.3 and dplyr 0.8.0.1 #11

Open
rpodcast opened this issue Apr 4, 2019 · 0 comments
Open

error when using rlang 0.3.3 and dplyr 0.8.0.1 #11

rpodcast opened this issue Apr 4, 2019 · 0 comments

Comments

@rpodcast
Copy link

rpodcast commented Apr 4, 2019

I'm not sure which of the packages is causing the error, but here is the error I receive when running the filter_loudly example in the readme. This is running on R 3.5.2 with dplyr 0.8.0.1, rlang 0.3.3, and friendlyeval 0.1.1:

filter_loudly <- function(x, ...){
  dots <- list(...)
  ## if accepting list arguments, should check all are character
  stopifnot(purrr::every(dots, is.character))
  
  in_rows <- nrow(x)
  out <- filter(x, !!!treat_strings_as_exprs(dots))
  out_rows <- nrow(out)
  message("Filtered out ",in_rows-out_rows," rows.")
  return(out) 
}

data(mtcars)
filter_loudly(mtcars, 'cyl >= 6', 'am == 1')

Error:

Error: `x` must be a character vector or an R connection
Call `rlang::last_error()` to see a backtrace 

> rlang::last_error()
<error>
message: `x` must be a character vector or an R connection
class:   `rlang_error`
backtrace:
 1. global::filter_loudly(mtcars, "cyl >= 6", "am == 1")
 8. friendlyeval::treat_strings_as_exprs(dots)
 9. rlang::parse_exprs(arg)
Call `rlang::last_trace()` to see the full backtrace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant