Install.packages (ggplot2)

Hi guys
I couldn't install packege ggplot2, and get this error:

Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): namespace ‘rlang’ 0.4.7 is already loaded, but >= 0.4.10 is required.

This is asking you to update the rlang package

Install.packages("rlang")
2 Likes

When I installed "rlang" package got this message:

Warning in install.packages :
package ‘rlang’ is in use and will not be installed

Reset your R session (or RStudio session if it's the case) before updating.

1 Like

I'm still facing an issue even after Reset my R session

If you get the exact same message then something is loading rlang on startup. Make sure it is not being loaded through a Rprofile.site or .Rprofile file and that you are not restoring your previous environment on startup.