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)
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.
Output: