无法在R版本3.2.3中完全安装软件包("caret")

Sam*_*Lee 9 r package

> require("caret")
  Loading required package: caret
  Loading required package: lattice
  Loading required package: ggplot2
  Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck =      vI[[j]]) : 
   there is no package called ‘pbkrtest’
Run Code Online (Sandbox Code Playgroud)

所以我发现缺少"pbkrtest"然后我试图重新安装它.

> install.packages("pbkrtest")
 Installing package into ‘C:/Users/ADMIN/Documents/R/win-library/3.2’
 (as ‘lib’ is unspecified)

 There is a binary version available but the source version is
 later:
     binary source needs_compilation
 pbkrtest  0.4-2  0.4-3             FALSE

 installing the source package ‘pbkrtest’

trying URL 'https://rweb.crmda.ku.edu/cran/src/contrib/pbkrtest_0.4-  3.tar.gz'
Content type 'application/x-gzip' length 164415 bytes (160 KB)
downloaded 160 KB

* installing *source* package 'pbkrtest' ...
** package 'pbkrtest' successfully unpacked and MD5 sums checked
** R
** data
** inst
** preparing package for lazy loading
Warning: replacing previous import by 'stats::sigma' when loading 'pbkrtest'
Error : object 'sigma' is not exported by 'namespace:stats'
ERROR: lazy loading failed for package 'pbkrtest'
* removing 'C:/Users/ADMIN/Documents/R/win-library/3.2/pbkrtest'

The downloaded source packages are in 
    ‘C:\Users\ADMIN\AppData\Local\Temp\Rtmpk7mJT0\downloaded_packages’
Warning messages:
1: running command '"D:/R-3.2.3/bin/x64/R" CMD INSTALL -l     
"C:\Users\ADMIN\Documents\R\win-library\3.2"   

  C:\Users\ADMIN\AppData\Local\Temp\Rtmpk7mJT0/downloaded_packages/pbkrtest_0.4-  3.tar.gz' had status 1 
2: In install.packages("pbkrtest") :
installation of package ‘pbkrtest’ had non-zero exit status
Run Code Online (Sandbox Code Playgroud)

好像安装一直在失败.结果,我无法使用插入包使用其他代码.

小智 2

我在 Windows 7 上也遇到了这个问题。我按照顺序执行了以下步骤,结果成功了。a) 确保您的 R 版本已更新为最新的 R 版本 3.2.3 b) 默认源似乎正在安装 Unix 版本。所以我手动下载了适用于 Windows 的https://cran.r-project.org/web/packages/pbkrtest/index.html c) 使用 R 菜单中的手动安装功能来安装软件包。

干杯,拉坦