This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to solve an error while installing Hmisc package in R?

I am trying to install hmisc package for some descriptive statistics in R. But I am facing an error given below.

package ‘colorspace’ successfully unpacked and MD5 sums checked Error in install.packages : ERROR: failed to lock directory ‘C:\Users\Hammad\OneDrive\Documents\R\win-library\3.6’ for modifying Try removing ‘C:\Users\Hammad\OneDrive\Documents\R\win-library\3.6/00LOCK’

How can I fix this problem?

Thanks.

hmisc r

1 answer

Find the file “00LOCK” in the directory mentioned manually and delete it

It worked. Thank you so much. But now, when I start loading it using command library(Hmisc), I get the following warning. Would you please help me to figure it out?

WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/Hammad/OneDrive/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘Hmisc’ is in use and will not be installed

I have also downloaded rtool40 and installed it as well. I am not sure is it correctly installed or not, as apparently it seems to be installed. And still receiving the warning message. Please give any suggestion or solution. Thanks.

Yes, I have installed it from the mentioned website and I have restarted the R studio now. I think it should work now. Please tell me the command to perform descriptive statistics/ Independent sample t-test. If you write it in steps, I would be obliged.

But, why do want to perform it in R studio? you can also perform it in Excel sheet !

Because I am a beginner in R programming, and I want to learn data analysis using R.

I am sorry, but you have to look it up for yourself. Just google whatever you trying to learn, I think you will find plenty of options.

Log in to answer this question.