Error could not find switch_rlang (With JDBC backened)

Hi,

Since update of rlang, the following functionality fails with switch_rlang not found.
Is any workaround about that?
Thanks, this is a code example.

name_db <- tbl(conn, sql(
+   "select COMMONNAME, COUNT(*) as N
+   from my_database
+   group by COMMONNAME
+   order by N"
+ )) %>%
+   arrange(desc(N))
Error in switch_lang(call, inlined = , namespaced = , recursive = eval_bare(call,  : 
  could not find function "switch_lang"
1 Like

The symptom matches this note (from rlang 0.4.0 NEWS)

  • lang_type_of() , switch_lang() , and coerce_lang() were archived. These functions were not used on CRAN or internally.

My guess is perhaps some other package (dplyr or dbplyr) may also need an update to not trigger this issue. I think dbplyr possibly used switch_lang() at some point (ref).

1 Like

A traceback() will help you figure out exactly what package is causing the problem; then try updating it.

1 Like

Hi,
Yes traceback is pointing to dbplyr::arrange.tbl_lazy
I am not worried about it because I have workarounds but maybe I should just create an issue in dbplyr pointing this error?
Thanks,

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.