The shiny package will not load after installation - r

I tried:
install.packages('shiny')
library(shiny)
Got the following message:
Error: package or namespace load failed for ‘shiny’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘htmltools’
In addition: Warning message:
package ‘shiny’ was built under R version 4.0.5
I tried starting over and loading htmltools and then also the following error:
Error in library(htmltools) : there is no package called 'htmltools'

Related

package or namespace load failed for 'shiny'

When I am trying to install shiny in R studio I am getting this error
there is no package called 'httpuv'
, so I tried using package.install('httpuv') but here I got something like
In install.packages("httpuv") :
installation of package 'httpuv' had non-zero exit status
After that I tried to library(shiny) to get load shiny but still got the same error that httpuv is missing below.
library(shiny)
Error: package or namespace load failed for 'shiny' in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called 'httpuv'

R package Error: package or namespace load failed for ‘reshape2’ in loadNamespace: there is no package called ‘magrittr’

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")

Failed to use tidyr function "spread"

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"

Error: package or namespace load failed for ‘devtools’ came up when loading devtools package

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

Getting error with forecast library in R, what to do? I have re-installed the library but this error keeps coming

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

Resources