I got those errors for FactomineR and dplyr. And when I try to install ggplot2 and lifecycle, R tells me the packages are currently loaded and ask me if I want to restart a session..
library(FactoMineR)
Erreur : package or namespace load failed for ‘FactoMineR’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
aucun package nommé ‘ggplot2’ n'est trouvé
De plus : Warning message:
le package ‘FactoMineR’ a été compilé avec la version R 4.0.5
library(dplyr)
Erreur : package or namespace load failed for ‘dplyr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
aucun package nommé ‘lifecycle’ n'est trouvé
De plus : Warning message:
le package ‘dplyr’ a été compilé avec la version R 4.0.5
install.packages("lifecycle")
Error in install.packages : Updating loaded packages
install.packages("ggplot2")
Error in install.packages : Updating loaded packages
Indeed, the problem is that dependencies of {ggplot2} seem to be loaded in the current session and it can't be installed. The solution is to first close all instances of RStudio and all R sessions, then open a fresh session, and rerun the install.packages("ggplot2") command.
This should work in RStudio, if this fails open an R session in the terminal, making sure that RStudio is closed.