How to load sjPlot when receiving namespace:insight error? - r

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!

Related

can't load package kknn in r studio

looks like the package has been successfully installed, however, the below message keeps appearing:
Error: package or namespace load failed for ‘kknn’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘lattice’
The kknn package was successfully installed before today. But I can't knit the document to pdf, so I installed a package called latexpdf. After that, the whole RStudio just doesn't function well. I don't know what happened... tried to re-install but doesn't help.
Does anyone know what should I do with this? thank you!
Thanks for the modification!
I installed Lattice package and the problem solved...what a silly question...

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.

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

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.

Resources