This is the error I have when trying to load ggpubr.
Error: package or namespace load failed for ‘ggpubr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘dplyr’ 1.0.7 is already loaded, but >= 1.0.10 is required
In addition: Warning message:
package ‘ggpubr’ was built under R version 4.1.3
I tried also installing and updating the package dplyr but run into a different error when trying to update dplyr. I've tried selecting 'yes' to the popup window "Do you want to restart R prior to install?" which leads to an endless loop of popup windows and 'no' which then leads to the following output.
Installing package into ‘C:/Users/Sandi/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
also installing the dependency ‘tibble’
There is a binary version available but the source version is later:
binary source needs_compilation
dplyr 1.1.2 1.1.3 TRUE
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/tibble_3.2.1.zip'
Content type 'application/zip' length 702025 bytes (685 KB)
downloaded 685 KB
package ‘tibble’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘tibble’
Warning in install.packages :
problem copying C:\Users\Sandi\Documents\R\win-library\4.1\00LOCK\tibble\libs\x64\tibble.dll to C:\Users\Sandi\Documents\R\win-library\4.1\tibble\libs\x64\tibble.dll: Permission denied
Warning in install.packages :
restored ‘tibble’
The downloaded binary packages are in
C:\Users\Sandi\AppData\Local\Temp\Rtmpy25ERA\downloaded_packages
installing the source package ‘dplyr’
trying URL 'https://cran.rstudio.com/src/contrib/dplyr_1.1.3.tar.gz'
Content type 'application/x-gzip' length 1083635 bytes (1.0 MB)
downloaded 1.0 MB
* installing *source* package 'dplyr' ...
** package 'dplyr' successfully unpacked and MD5 sums checked
ERROR: cannot remove earlier installation, is it in use?
* removing 'C:/Users/Sandi/Documents/R/win-library/4.1/dplyr'
* restoring previous 'C:/Users/Sandi/Documents/R/win-library/4.1/dplyr'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
problem copying C:\Users\Sandi\Documents\R\win-library\4.1\00LOCK-dplyr\dplyr\libs\x64\dplyr.dll to C:\Users\Sandi\Documents\R\win-library\4.1\dplyr\libs\x64\dplyr.dll: Permission denied
Warning in install.packages :
installation of package ‘dplyr’ had non-zero exit status
I tried to start over by using remove.packages(dplyr) but it says 'dplyr' not found. I'm stuck on where to go from here.
As Allan said:
(Install if not installed, or) update dplyr:
install.packages("dplyr")
library(dplyr)
install.packages("ggpubr")
library(ggpubr)