Test Case:
library(dplyr)
library(plyr)
library(dplyr)
mtcars%>%rename(x=gear)
This gives error. Any help would be greatly appreciated.
I have this problem when require plyr again sourcing files. You can do
if("dplyr" %in% (.packages())){
detach("package:dplyr", unload=TRUE)
detach("package:plyr", unload=TRUE)
}
library(plyr)
library(dplyr)
Based on @hadley's tweet. Best answer is to load plyr ALWAYS before dplyr, AND not load plyr again. Pasting his tweet for reference.
Hadley Wickham @hadleywickham Jul 27
@gunapemmaraju just load plyr before dplyr?