RStudio Workbench No package called 'car' when loading ggpubr - r

I cannot manage to get the car package to download on RStudio Workbench version R 4.1.1. I am attempting to use the stat_cor function and get the error that it could not find function stat_cor, and from looking things up online, I need to download the ggpubr package and when I download it, I get the error:
Error: package or namespace load failed for ‘ggpubr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘car’
So my next step is to download car but I get another error from there essentially saying "Configuration failed for package 'nloptr'" and also "dependency 'nloptr' is not available for package 'lme4'" and lastly "dependency 'lme4' is not available for package 'car'". I tried installing nloptr and get the same error.
I am new with this, but if I want to use the stat_cor function I need ggpubr, and for ggpubr I need car to work right? Any help would be great.
install.packages("ggpubr")
install.packages("car")
library('ggplot2')
library('ggpubr')
library('car')

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!

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.

Error Installing Forecast package in R Studio

I am trying to install the forecast package in R Studio ( Version 1.0153) and when i try to call the package using library(forecast) i get this error
"Error: package or namespace load failed for ‘forecast’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘tibble’"
While installing the forecasting package i used the command install.packages("forecast",dep=T). This is the first time i am encountering a problem when trying to install a package.
I did so using this command in the console and the package was successfully installed.
install.packages('forecast')
When using
install.packages("forecast",dep=T)
I also received the same error as you. So will the other line do the trick?
Note I am using R 3.4 as well in the console.

Error: package or namespace failed for 'ecospat'

I have seen similar questions for other packages and I have tried solutions offered in other posts, such as removing the package and installing it again, clearing global environment etc, but I still get the same error.
> library(ecospat)
Loading required package: ade4
Loading required package: ape
Loading required package: sp
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘slam’
I have tried updating all packages in RStudio, to no avail. I am currently trying to run a Boosted Regression Tree for data I have. If I proceed with the above error, I end up getting:
Error: could not find function "ecospat.boyce"
Any help would be highly appreciated.
I was having the same error message but in my case, it was the package called latticeExtra the one missing on my computer. I tried installing that package but was not available from CRAN. Then, I looked for the tar.gz file and tried installing the package, an error message popped up saying I needed a most recent version of R. Finally, I updated my R version (from 3.5.3 to 3.6.3) and tried using the ecospat package, it worked!

Resources