Dplyr error package was built under 3.2.5

dplyr

#1

First, I tried to load dplyr and I got the following message:

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘DBI’
In addition: Warning message:
package ‘dplyr’ was built under R version 3.2.5
Error: package or namespace load failed for ‘dplyr’

O notice that DBI was missing, so I did install.packages(“DBI”). However it seems I can’t access dplyr (and other packages by the way) due to objects that are masked…

after installing DBI:

library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

filter, lag

The following objects are masked from ‘package:base’:

intersect, setdiff, setequal, union

Warning message:
package ‘dplyr’ was built under R version 3.2.5

Windows 10.
R and RStudio recently downloaded and updated.


#2

That’s just a warning message and should (probably) not affect you.

The masking comments are about functions which are used in other packages, so dplyr overrides these. If you wish to use the masked versions of the functions then you need to specify e.g. stats::filter.


#3

library warns about an old R build version because it could potentially cause bugs. R 3.2.5 is now pretty old, so the most likely way to get such an error is not to update your packages for a long time. Updating is a good idea, as dplyr has matured significantly in the last year or so. Even if you somehow did get the current dplyr version installed with an old R version, the solution is the same:

update.packages(checkBuilt = TRUE)

#4

Thank you both martin and alistaire!

I just saw that I had dozens of packages without updating at all… Thank you very much for such usefull comment =)