如何在R中安装“ Hmisc”

时间:2018-10-20 03:33:41

标签: r hmisc

在此处输入代码

install.packages("Hmisc")

Warning in install.packages : unable to access index for repository https://cran.rstudio.com/src/contrib:
  cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES' Installing package into
  ‘C:/Users/Tushant/Documents/R/win-library/3.4’ (as ‘lib’ is unspecified) 
Warning in install.packages : unable to access index for repository https://cran.rstudio.com/src/contrib:
  cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages : package ‘Hmisc’ is not available (for R version 3.4.2)
Warning in install.packages : unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/3.4:
  cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/PACKAGES'

2 个答案:

答案 0 :(得分:1)

我不知道您是否对问题的答案感兴趣,但是今天我遇到了同样的问题,因此我通过下载最新版本的R软件解决了这个问题。

答案 1 :(得分:1)

Hmisc 包是一个依赖包。依赖包:生存、格子、ggplot2、公式。 您访问 https://mran.microsoft.com/package/Hmisc

示例:

Text Field Equal To = string exp = "(Name =\"India\")";
Text Field NOT Equal To = string exp = "(Name !=\"India\")";
Text Field Contains = string exp = "(Name.Contains (\"Ind\"))";
Text Field Starts With = string exp = "(Name.StartsWith (\"Ind\"))";
Text Field Ends With = string exp = "(Name.EndsWith (\"a\"))";

Number Field Equal to = string exp = "(Id = 1)";
Number Field Between with multiple conditions = string exp = "(Id > 1 AND Id <= 3) OR Id =3";
Number Field Between and greater than equal to = string exp = "(Id > 1 AND Id >= 3)";

Date Field Between  = string exp = "(Dt > Convert.ToDateTime(\"2/5/2021 4:46:04 AM\") AND Dt >= Convert.ToDateTime(\"2/3/2021 4:46:04 AM\"))";