Issue installing Hmisc in Rstudio and calling in the library - r

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

Related

RStudio Workbench No package called 'car' when loading ggpubr

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

impossible to find the function "ggplot"

I am having problems with ggplot, getting the above error message.See full error message below after running library(ggplot2):
Error: package or namespace load failed for 'ggplot2' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
'vctrs' package 0.3.6 is already loaded, but >= 0.3.8 is required
Also: Warning message:
package 'ggplot2' was compiled with R 4.0.5
I have tried removing the package and then reinstalling it with dependencies. Nothing seems to work. The error seems to have been triggered when I tried to do an install of the ggflags package from Github, the package info states that it is a ggplot extension. Please give me an idea of how to fix this because I use ggplot for all data viz in R
Try the following shotgun-approach, as I suspect you are missing relevant packages,
# remove packages
remove.packages("tidyverse")
# reinstall
install.packages("tidyverse", dependencies = TRUE)
If this does not work, you should post your sessionInfo() in your post.

How to install package tm in R-3.3.0

I'm using R-3.3.3. I tried to install package tm using following commands
install.packages('tm',dependencies = TRUE)
library('tm')
But I'm getting error message
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘slam’
In addition: Warning message:
package ‘tm’ was built under R version 3.3.3
Error: package or namespace load failed for ‘tm’
I saw two solutions for same type of error here & dependency ‘slam’ is not available when installing TM package. I tried those two but I'm getting error message like
Installation failed: Could not find build tools necessary to build slam.
Kindly suggest me how to install tm package in R-3.3.3
I faced the same problem today, after testing many ways to solve it I could find the following command that can install the tm package, sorry I know it is very late but still useful.
require(devtools)
install_version("tm", version = "0.7-1", repos = "http://cran.us.r-project.org")

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!

BiodiversityR package failing to load

I'm trying to load the BiodiversityR package and getting the following error and warning messages:
library(BiodiversityR)
Loading required package: tcltk
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace ‘pbkrtest’ 0.4-2 is being loaded, but >= 0.4.4 is required
In addition: Warning message:
package ‘BiodiversityR’ was built under R version 3.2.5
Error: package or namespace load failed for ‘BiodiversityR’
I don't understand what it means/what I need to do to fix it. Can anyone please help? Thank you!
The relevant part of the error message is this:
Error … :
namespace ‘pbkrtest’ 0.4-2 is being loaded, but >= 0.4.4 is required
— Your package (indirectly) depends on another package called ‘pbkrtest’. This package is installed but apparently outdated. You need to reinstall it using install.packages('pbkrtest').
The additional warning message gives a hint about the source of this error: you updated R after installing some packages. You may need to reinstall all packages after upgrading R. In fact, the warning suggests that it’s probably a good idea to also reinstall the ‘BiodiversityR’.

Resources