r programming - error in loadnamespace - package or namespace load failed - r

This might be a very basic question but I am not getting anything about this. I searched many approaches after googling and none of them worked for me.
The issue is that whenever I tried to load any default package like swirl or download any package and then source that to R, I am getting the error below.
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘stringi’
Show Traceback
Rerun with Debug
Error: package or namespace load failed for ‘stringr’
Could someone please help me on this?

Install the "stringi" package first.
I had the same issue. Actually, there were two different packages mentioned in the error message: "stringi" and "stringr" packages. I misread the last letter and thought I had already installed the package.

Related

How to load sjPlot when receiving namespace:insight error?

When loading sjPlot, I receive the following error:
Error: package or namespace load failed for ‘sjPlot’:
object ‘reshape_ci’ is not exported by 'namespace:insight'
I read elsewhere that the insight package might be out of date. So I've tried to update the insight package to no avail. I also tried updating the sjPlot package without success. I did all of these things in combination with restarting a clean RStudio session (closing and re-opening RStudio) and also removed and re-installed sjPlot and insight. I also tried update.packages() for both sjPlot and insight.
I'm out of ideas on how to load the sjPlot package at this point. How can I load it?
I had the same problem:
library("sjPlot")
Error: package or namespace load failed for ‘sjPlot’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘nloptr’
After many tries I receive a message from R:
Install package "strengejacke" from GitHub (devtools::install_github("strengejacke/strengejacke")) to load all sj-packages at once!

R tells me I'm missing a dependency package when I'm not?

I have a handful of R scripts that I routinely run every day so all of the necessary packages have been running just fine for months. Yesterday I installed the RInno package and I believe this has somehow affected other packages because my routine scripts no longer run due to the inability to load my normal packages.
When troubleshooting I started with the odbc package. When trying to load it gives me:
Error: package or namespace load failed for ‘odbc’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘Rcpp’
I then ran .libPaths(), checked both of the returned paths, and the Rcpp package existed in both.
I've even tried re-installing both odbc and Rcpp with no luck. Does anyone know what could be going on here?
Update1: While trying to re-install Rcpp did not work, re-installing dplyr did manage to fix the missing rlang issue. So I decided to go download Rcpp directly from https://cran.r-project.org/web/packages/Rcpp/index.html and then paste it manually into both of my library folders. This seems to have fixed the Rcpp issue but I am now met with the following new error when trying to load odbc or run devtools::session_info():
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : object 'vI' not found
Update2: Ultimately I decided to do a restore on my two library folders to a time before I installed RInno and it seems to have worked. I still have no idea what RInno did but I won't be trying that again.

Issue installing Hmisc in Rstudio and calling in the library

I've had the following error for the package Hmisc. I read another thread which asked more about the error message however it said not to post this as a comment. I've installed the package and received the following error when calling in the library:
> library(Hmisc)
Error: package or namespace load failed for ‘Hmisc’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘checkmate’
In addition: Warning message:
package ‘Hmisc’ was built under R version 3.4.4
I've tried deleting the install and then installing checkmate separately and manually installing this from a browser rather than through R directly. However the same error message is returning. Does anyone know how to overcome this? Or similar packages to Hmisc. I need to package for a wtd.quantile function.
install.packages('lattice')
library('lattice')
install.packages('survival')
library('survival')
install.packages('Formula')
library('Formula')
install.packages('ggplot2')
library('ggplot2')
install.packages('checkmate')
library('checkmate')
install.packages('htmlwidgets')
library('htmlwidgets')
install.packages('stringi')
library('stringi')
install.packages('Hmisc')
library('Hmisc')

Trouble Installing and Calling R Package

I am trying to install the R package "rattle".
I do so by simply typing:
install.packages("rattle")
...upon which a lot of good installin' seems to take place. But then when I call the package
library(rattle)
I get the error message
Error: package or namespace load failed for ‘rattle’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘stringi’
All of the research I've done online suggests some form of
install.packages("rattle", insert_something_here)
but I've had no luck with such methods.
Any ideas on what I'm missing?
Ok, so the entire issue seemed to revolve around the stringi package.
I first installed the latest Rtools package from
https://cran.r-project.org/bin/windows/Rtools/
and then I was able to successfully install stringi manually
install.packages("stringi")
and then I could call rattle no problem.

Loading 'qdap' package failed in R

I have gone through the threads related to qdap but their problem is not the same as mine. Moreover, many of them do not have accepted answers. I installed 'qdap' package but when I load it using library(qdap), it returns the following error:
Error: package or namespace load failed for ‘qdap’ in loadNamespace(i,
c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package
called ‘openNLPdata’
I have even tried install.packages("qdap", dependencies = TRUE) but that did not make any difference. Any information in this regard will be helpful.
I met the same problem, too. I listed by solution as below.
First, you can try to install package(qdap) as this way.
library(devtools)
install_github("trinker/qdapDictionaries")
install_github("trinker/qdapRegex")
install_github("trinker/qdapTools")
install_github("trinker/qdap")
If "install_github("trinker/qdap")" is failed, you have to check the version of package "tm", which is "0.7.6". After updating this, you can install package "qdap" successfully.

Resources