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

问题描述 投票:0回答:1

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”软件包。它依赖于“收据”包,因此也再次下载了该包...

安装此消息后得到此消息。

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

我需要加载插入符号包以进行安装。

r caret install.packages
1个回答
0
投票

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

将您的库添加到libpaths;参见this answer。之后,尝试安装软件包;参见this answer

install.packages("caret", dependencies=TRUE, type="win.binary")
© www.soinside.com 2019 - 2024. All rights reserved.