0

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?

Tea Tree
  • 882
  • 11
  • 26
  • 1
    I suspect you need to update your installation of all the dependencies of sjPlot. – IRTFM Mar 05 '22 at 20:35
  • 3
    We're the installations/updates for `insight` successful, or did they produce errors ("non-zero exit status")? You could check if it is possible to load insight directly ( `library(insight)`). Or simply force the installation of sjPlot with all dependencies `devtools::install_cran("sjPlot", force = TRUE, dependencies = TRUE)` – pholzm Mar 05 '22 at 22:48
  • 3
    @pholzm: The ability to load pkg:insight will not tell you if a new version with the needed function is available. Your last suggestion is the one to go with. – IRTFM Mar 05 '22 at 23:44
  • updating all dependencies of sjPlot did the trick – Tea Tree Mar 06 '22 at 01:46
  • @IRTFM good point. Didn't consider this might be an issue after succesfully updating the packages to latest version. – pholzm Mar 06 '22 at 08:22

2 Answers2

0

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!

  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://stackoverflow.com/help/whats-reputation), you can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/33645529) – Marco Jan 17 '23 at 15:42
0

Simply install sjPlot from GitHub by using this line of codes

library(devtools)
devtools::install_github("strengejacke/sjPlot")

In case you receive error message that devtools is not available, you can install devtools first using:

install.package(devtools)
Marco
  • 2,368
  • 6
  • 22
  • 48