I have an R package that I would like to install from here, and as instructed by the authors, the way we should install it is as follows:
install.packages("uba_0.7.7.tar.gz",repos=NULL,dependencies=T)
Thsi gives me the following error in R studio:
Warning: invalid package 'uba_0.7.7.tar.gz' Error: ERROR: no packages specified In R CMD INSTALL Warning in install.packages : installation of package ‘uba_0.7.7.tar.gz’ had non-zero exit status
There is a similar question on stack overflow. I tried doing as such after downloading the .tar.gz file:
install.packages("C:/Users/96171/Downloads/uba_0.7.7.tar.gz",repos=NULL,type="source")
But still having an error:
ERROR: dependency 'Hmisc' is not available for package 'uba' * removing 'C:/Users/96171/Documents/R/win-library/3.5/uba' In R CMD INSTALL Warning in install.packages : installation of package ‘C:/Users/96171/Downloads/uba_0.7.7.tar.gz’ had non-zero exit status
However I tried:
install.packages("Hmisc")
as well as:
install.packages("Hmisc", dependencies = T)
But both did nothing. It is also important to note that I have RTools installed. The error is still the same:
Installing package into ‘C:/Users/96171/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) ERROR: dependency 'Hmisc' is not available for package 'uba' * removing 'C:/Users/96171/Documents/R/win-library/3.5/uba' In R CMD INSTALL Warning in install.packages : installation of package ‘C:/Users/96171/Downloads/uba_0.7.7.tar.gz’ had non-zero exit status
I also tried installing it from the cmd, It is not giving me the Hmisc
error.
sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.3 tools_3.5.3
I checked the installed packages needed for the intended package and got the following:
> "operators" %in% rownames(installed.packages())
[1] TRUE
> "class" %in% rownames(installed.packages())
[1] TRUE
> "fields" %in% rownames(installed.packages())
[1] TRUE
> "ROCR" %in% rownames(installed.packages())
[1] TRUE
> "DmwR" %in% rownames(installed.packages())
[1] FALSE
> "Hmisc" %in% rownames(installed.packages())
[1] FALSE
So I have all except Hmisc
, how can I install it correctly?
sessionInfo()
say? Pls do add this here – GWDinstall.packages(c("operators","class", "fields", "ROCR", "DMwR", "Hmisc"))
and thenuba
installed okay. ps your R version is a wee bit old which can cause issues when installing so do make sure the dependencies install correctly – user20650