I'm a beginner in using "R". To manipulate data when I'm trying to load "dplyr" package the following error message is showing:
Error: package or namespace load failed for ‘dplyr’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘lifecycle’
Can anyone help me to get rid of this, please? Thanks in advance.
Error: package or namespace load failed for ‘dplyr’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘lifecycle’
Thanks for your comment. I've installed the lifecycle package and I guess there is no error in here. Here I'm posting the message that is shown after the installation of the lifecycle package.
Restarting R session...
install.packages("lifecycle")
Installing package into ‘C:/Users/USER/OneDrive/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependency ‘rlang’
There are binary versions available but the source versions are later:
binary source needs_compilation
rlang 0.4.5 0.4.11 TRUE
lifecycle 0.2.0 1.0.0 FALSE
installing source package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 0.4.5 is being loaded, but >= 0.4.10 is required
ERROR: lazy loading failed for package 'lifecycle'
removing 'C:/Users/USER/OneDrive/Documents/R/win-library/3.5/lifecycle'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\USER\AppData\Local\Temp\RtmpIRXTD9\downloaded_packages’
Do you think it is okay or there are some problem in here? Will be happy to know your comment.
This says you should install a more recent version of rlang.
* Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 0.4.5 is being loaded, but >= 0.4.10 is required
ERROR: lazy loading failed for package 'lifecycle'
Can you please suggest me how can I install the updated "rlang" package? I tried to install it writing install.package("rlang") but it's installing the same version (0.4.5)
I'm using the R version 3.5.3
Since you are using a very old R version you are forced to compile packages from source instead of installing precompiled binaries. For compiling packages in Windows systems you need to install a suitable version of RTools, you can download it from here:
Altough I recommend updating your R version and also setting your package library folder in a non synced folder (outside OneDrive in your case) since R has problems with that very often.
Finally I get rid of the problem. I just installed the version 4.1.0 of R and now able to install dplyr package without any error. Thanks everyone for your responses.