So I have been working on this project for few months now. Every day I open the R project file and load the data and do the usual wrangling. Today all of a sudden "select" function is not working.
This is the error:
> starwars %>% select(height)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘select’ for signature ‘"tbl_df"’
I thought it might be a bug as I tidyverse. I rolled back, but still the same issue. What Should I do? Any solutions?
Hi and welcome to the RStudio Community. No this is not a bug. It is likely that you are either using a package besides dplyr that also has a select() function or you just forgot to load the dplyr package with library(dplyr). The second issue is easy to fix, just load the package. In case you are facing the first issue, then you can either load dplyr last in the list of packages you need for your project or you can just call the function with the double column operator ::.