Error with select function from dplyr

I had the same issue and it was caused by name clash with another package. Use: dplyr::select to specify the package.