"Hmisc"是指程序包或名称空间无法加载-没有名为"latticeExtra"的程序包 [英] "Hmisc" package or namespace failed to load - no package called 'latticeExtra'
问题描述
我在加载和运行Hmisc软件包时遇到问题.安装它时,出现以下错误;
I'm having trouble loading and running the Hmisc package. When installing it, I get the following error;
library(Hmisc)
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2
Error: package or namespace load failed for ‘Hmisc’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘latticeExtra’
我正在运行Rstudio 3.5.3
I'm running Rstudio 3.5.3
我尝试更新所有软件包.实际上,效果是,我有标记变量的代码,该变量不再运行并出现以下错误.
I've tried to update all packages. The flow on effect is I have code that labels variables, which no longer runs and gives the following error.
label(data$facem_360_v1_timestamp)="Survey Timestamp"
Error in label(data$facem_360_v1_timestamp) = "Survey Timestamp" :
could not find function "label<-"
任何建议将不胜感激.
Any suggesions would be appreciated.
推荐答案
最新版本的gridExtra 0.6-29要求R(≥3.6.0),如您在
The latest version of latticeExtra 0.6-29 requires R (≥ 3.6.0) as you can see in https://cran.r-project.org/web/packages/latticeExtra/index.html. Having the same problem as you installing Hmisc, I downloaded the previous release of latticeExtra, 0.6.28 from https://cran.r-project.org/src/contrib/Archive/latticeExtra/ and installed it:
R CMD INSTALL latticeExtra_0.6-28.tar
然后我可以安装Hmisc最新版本:
I could then install the Hmisc latest version:
R CMD INSTALL Hmisc_4.3-0.tar
这篇关于"Hmisc"是指程序包或名称空间无法加载-没有名为"latticeExtra"的程序包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!