I had to re-install RStudio on my machine, and now I encounter an error when using the "spread" function in "tidyr". I can use "stringr" though. Here is the error message.
Error: package or namespace load failed for ‘tidyr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘dplyr’ 0.8.0.1 is already loaded, but >= 0.8.2 is required
In addition: Warning message:
package ‘tidyr’ was built under R version 3.6.3
Error in spread(., solution, sum_fund) : could not find function "spread"
Related
Error: package or namespace load failed for ‘gtsummary’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘cli’ 3.1.0 is already loaded, but >= 3.1.1 is required
In addition: Warning message:
package ‘gtsummary’ was built under R version 4.1.3
Just try install.packages("cli") to update the package to the latest version.
I have installed install.packages("reshape2") on R 3.4.3
but when I try to use that library like
library(reshape2)
I get the below error
Error: package or namespace load failed for ‘reshape2’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘magrittr’
In addition: Warning message:
package ‘reshape2’ was built under R version 3.4.4**
But I want reshape2 to run on R 3.4.3 only
Anyone know how to fix this?
Fixed by the below command:
install.packages("https://cran.r-project.org/src/contrib/Archive/magrittr/magrittr_1.5.tar.gz", repos = NULL, type="source")
I successfully installed the devtools package, but when I wanted to load the package, this error came up:
library(devtools)
Error: package or namespace load failed for ‘devtools’ in
loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck =
vI[[j]]): namespace ‘cli’ 3.0.1 is already loaded, but >= 3.1.0 is
required In addition: Warning message: package ‘devtools’ was built
under R version 4.1.2
library(forecast)
Error: package or namespace load failed for ‘forecast’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘rlang’ 0.4.6 is already loaded, but >= 0.4.7 is required
In addition: Warning message:
package ‘forecast’ was built under R version 4.0.3
I wanted to remove a package and then reinstall it because there were new functions I wanted, but now I seem to have a compatibility issue I cannot get rid of.
I did:
remove.packages("dplyr")
install.packages("dplyr")
library(dplyr)
But I get:
Error: package or namespace load failed for ‘dplyr’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘rlang’ 0.4.6 is already loaded, but >= 0.4.7 is required
In addition: Warning message:
package ‘dplyr’ was built under R version 3.6.3
How can I update this rlang package and successfully load dplyr?