I want to use package semPlot and I get the error message as follows.
library(semPlot) Error: package or namespace load failed for ‘semPlot’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): namespace ‘rlang’ 1.0.6 is already loaded, but >= 1.1.0 is required In addition: Warning message: package ‘semPlot’ was built under R version 4.2.3
However, the latest version of rlang is 1.0.6 https://cran.r-project.org/src/contrib/Archive/rlang/
I have tried these codes: install.packages("rlang") library(semPlot) install.packages("semPlot", dependencies = TRUE)
As @NicChr said, the current CRAN version of rlang is 1.1.0.  The page you quoted https://cran.r-project.org/src/contrib/Archive/rlang/ is for old versions, not current ones.
Running update.packages(ask = FALSE) will probably get you the newest CRAN versions of all packages.  However, it might fail if you already have old versions loaded, so you should do this as the first thing in a new session, before running any other code.
It may also cause problems if you don't have write permissions on your system library, because then it will create a user library for you, and you can end up with different versions of packages in the two libraries. If that happens, my advice would be to exit R, run it with admin privileges, and delete the old versions.
In fact, it might make sense to delete every package except "base" packages from the system library. Then exit R, run again with regular privileges, and re-install the ones you want, so they go into your user library. This way you won't run into this problem again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With