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

translate_sql, %in% and a vector starting with -1 #1002

Closed
daroczig opened this issue Mar 4, 2015 · 1 comment
Closed

translate_sql, %in% and a vector starting with -1 #1002

daroczig opened this issue Mar 4, 2015 · 1 comment
Labels
Milestone

Comments

@daroczig
Copy link

@daroczig daroczig commented Mar 4, 2015

This example throws a strange error:

> translate_sql(numbers %in% c(-1, 0))
Error in vapply(dots(...), escape_expr, character(1)) : 
  values must be length 1,
 but FUN(X[[5]]) result is length 2

Although the following works fine:

>  translate_sql(numbers %in% c(0, -1))
<SQL> "numbers" IN ('0', ' - 1.0')

Session info:

R version 3.1.1 (2014-07-10)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] dplyr_0.4.1    devtools_1.7.0

loaded via a namespace (and not attached):
[1] assertthat_0.1 DBI_0.3.1      magrittr_1.5   parallel_3.1.1 Rcpp_0.11.4   
[6] tools_3.1.1   
@daroczig daroczig changed the title translate_sql and a vector starting with -1 translate_sql, %in% and a vector starting with -1 Mar 4, 2015
@hadley hadley added this to the 0.5 milestone May 19, 2015
@hadley hadley closed this in a176725 Mar 8, 2016
@daroczig
Copy link
Author

@daroczig daroczig commented Mar 8, 2016

Thank you!

@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.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants