Could someone help me with this? I cannot use the ggpubr package. R keeps giving me this error message. I have the latest version of R (4.2.3) as well as the latest version of R studio. I have tried a few things, nothing works.
Error: package or namespace load failed for ‘ggpubr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): namespace ‘cli’ 3.4.1 is already loaded, but >= 3.6.1 is required In addition: Warning message: package ‘ggpubr’ was built under R version 4.2.3
Error: package or namespace load failed for ‘ggpubr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): namespace ‘cli’ 3.4.1 is already loaded, but >= 3.6.1 is required In addition: Warning message: package ‘ggpubr’ was built under R version 4.2.3
This error occurs when you attempt to load a package that depends on another, but the version you have installed does not satisfy the version requirement.
Installing the newest (or sufficiently new) version should solve the issue.
install.packages("cli")
Your second error suggests an additional issue
Error: package or namespace load failed for ‘ggpubr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘car’ In addition: Warning messages: 1: package ‘ggpubr’ was built under R version 4.2.3 2: package ‘ggplot2’ was built under R version 4.2.3
Here, it reports that the car
-package is missing. Install it with
install.packages("car")