0

I am trying to use the tidyr::unite function on a tibble from a SQLite query. I get the following error:

Error in UseMethod("unite_") : no applicable method for 'unite_' applied to an object of class "c('tbl_dbi', 'tbl_sql', 'tbl_lazy', 'tbl')"

I think it's a similar issue for the spread function which was resolved on another thread (Transpose dplyr::tbl object). I was wondering if there is a similar fix or other workaround for the unite function.

  • 2
    What's the code you are actually running? When asking for help, you should include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Aug 29 '18 at 20:44
  • This is likely because you've run a query on the SQLite database, but not collected the results, and `unite` is not implicitly calling `collect` for you. Check out https://dplyr.tidyverse.org/reference/compute.html for a little more information on that. – tblznbits Aug 29 '18 at 20:49

0 Answers0