首页 > 解决方案 > 在 RStudio 中安装“汽车”包以运行 LeveneTest() 时遇到问题

问题描述

#part b
#based on some online sources, it'll be easier to add BP to the original data.frame then trim it down a bit
install.packages("car",dependencies=TRUE)
#we also need this package
hyper$BP <- (hyper$systolic + hyper$diastolic)/2
leveneTest(hyper$BP,hyper$diet)

看来我可以安装“汽车”包,但是当我尝试调用库(汽车)之后,我收到了这个错误:

Error: package or namespace load failed for ‘car’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘zip’

然后它继续说

Error in leveneTest(hyper$BP, hyper$diet) : 
  could not find function "leveneTest"

我正在尝试运行 Levene 的测试,但似乎找不到正确的依赖项

标签: rinstallationpackage

解决方案


推荐阅读