2

I am unable to install the package Hmisc. The command install.packages(Hmisc) yields: Error in install.packages : object 'Hmisc' not found.

I downloaded the zip file from CRAN, then ran install.packages(pkgs="F:/Temp/Hmisc_3.16-0.zip"). That yields: Installing package into ‘C:/Users/Athena/Documents/R/win-library/3.2’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘F:/Temp/Hmisc_3.16-0.zip’ is not available (for R version 3.2.2)

I am running Win7, R version 3.2.2 (2015-08-14) -- "Fire Safety", and RStudio Version 0.99.473.

Is there a fix I can try?

Steve Maguire
  • 393
  • 1
  • 4
  • 11

1 Answers1

2

The package name should be in quotes, so:

install.packages("Hmisc")

Without quotes, you are passing a variable called Hmisc which most likely has not been assigned hence the object 'Hmisc' not found error.

To install a package from source you need to set repos=NULL and type="source":

install.packages(path_to_file, repos = NULL, type="source")
mattdevlin
  • 1,045
  • 2
  • 10
  • 17