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: Ignore na.rm = TRUE in the quantile function #600

Closed
andyquinterom opened this issue Feb 15, 2021 · 0 comments · Fixed by #632
Closed

Error: Ignore na.rm = TRUE in the quantile function #600

andyquinterom opened this issue Feb 15, 2021 · 0 comments · Fixed by #632
Labels
feature a feature request or enhancement func trans 🌍 Translation of individual functions to SQL

Comments

@andyquinterom
Copy link

andyquinterom commented Feb 15, 2021

While creating a shiny application that reads both local files and database queries, I found a problem with the quantile function and PostgreSQL.

If na.rm is not present in the quantile function for local data, the code would not work as intended. If na.rm is set to try it works perfectly. However, if na.rm is set to true and a database table is passed on then it errors out.

If na.rm could just be ignored for tbl_lazy then it would work perfectly.

tbl_lazy(mtcars) %>%
  summarise(q = quantile(mpg, 0.5, na.rm = TRUE)

Output:

<SQL>
Error in quantile(mpg, 0.5, na.rm = TRUE) : 
  unused argument (na.rm = TRUE)
@andyquinterom andyquinterom changed the title Ignore na.rm = TRUE in the quantile function Error: Ignore na.rm = TRUE in the quantile function Feb 23, 2021
@hadley hadley added feature a feature request or enhancement func trans 🌍 Translation of individual functions to SQL labels Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement func trans 🌍 Translation of individual functions to SQL
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants