繁体   English   中英

如何安装插入符号包。 尝试 install.packages("caret") 但出现错误

[英]How to install caret package. Tried install.packages("caret") but getting error

install.packages("caret")以下错误后:

Installing package into ‘...../R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘rlang’, ‘recipes’


  There are binary versions available but the source versions are later:
        binary source needs_compilation
rlang    0.3.4  0.4.0              TRUE
recipes  0.1.5  0.1.6             FALSE
caret   6.0-81 6.0-84              TRUE

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/rlang_0.3.4.zip'
Content type 'application/zip' length 1080437 bytes (1.0 MB)
downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/caret_6.0-81.zip'
Content type 'application/zip' length 5392174 bytes (5.1 MB)
downloaded 5.1 MB

package ‘rlang’ successfully unpacked and MD5 sums checked
Warning in install.packages :
  cannot remove prior installation of package ‘rlang’
package ‘caret’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    .........\Temp\RtmpkJG4l1\downloaded_packages
installing the source package ‘recipes’

trying URL 'https://cran.rstudio.com/src/contrib/recipes_0.1.6.tar.gz'
Content type 'application/x-gzip' length 968331 bytes (945 KB)
downloaded 945 KB

ERROR: dependency 'rlang' is not available for package 'recipes'
* removing 'C:/Users/PBiradarP/Documents/R/win-library/3.4/recipes'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "......\R\win-library\3.4" 
...../Temp\RtmpkJG4l1/downloaded_packages/recipes_0.1.6.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘recipes’ had non-zero exit status

我也试过并安装了“rlang”包。 它依赖于“recepies”包,所以再次下载了它......

安装后收到此消息。

 :Warning in install.packages :
  package ‘recepies’ is not available (for R version 3.4.4)

我需要加载要安装的插入符号包。

如果您使用的是 Windows,请尝试以下操作:

将您的库添加到 libpaths; 看到这个答案 之后尝试安装软件包; 看到这个答案

install.packages("caret", dependencies=TRUE, type="win.binary")

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM