请帮助我在R中安装stringr和stringi软件包。结果是:

install.packages("stringi")
Installing package into ‘C:/Users/kozlovpy/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
пробую URL 'https://mran.revolutionanalytics.com/snapshot/2015-08-27/bin/windows/contrib/3.2/stringi_0.5-5.zip'
Error in download.file(url, destfile, method, mode = "wb", ...) :
  не могу открыть URL 'https://mran.revolutionanalytics.com/snapshot/2015-08-27/bin/windows/contrib/3.2/stringi_0.5-5.zip'
Вдобавок: Предупреждение:
В download.file(url, destfile, method, mode = "wb", ...) :
  'InternetOpenUrl' не удалось: 'Операция прервана по таймауту'
Предупреждение в download.packages(pkgs, destdir = tmpd, available = available,  :
  скачивание пакета ‘stringi’ не удалось

sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=Russian_Russia.1251  LC_CTYPE=Russian_Russia.1251    LC_MONETARY=Russian_Russia.1251 LC_NUMERIC=C
[5] LC_TIME=Russian_Russia.1251

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] plyr_1.8.2   tools_3.2.2  gtable_0.1.2 Rcpp_0.11.5  grid_3.2.2   digest_0.6.8 proto_0.3-10

我尝试遵循How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?链接中的建议,结果是下一个(不是肯定的):
  • 名称没问题
  • 只需设置所有可能的存储库
  • 软件包当然在存储库中
  • 'stringr'当然是一个软件包
  • 我的R尚未过期,我最近将其升级为3.2.0版
  • 'stringr'不是存档软件包
  • 这没有给出积极的结果:



    пробуюURL'https://mran.revolutionanalytics.com/snapshot/2015-08-27/src/contrib/stringi_0.5-5.tar.gz'
    内容类型“应用程序/八位字节流”长度3639183字节(3.5 MB)
    下载3.5 MB

    пробуюURL'https://mran.revolutionanalytics.com/snapshot/2015-08-27/src/contrib/stringr_1.0.0.tar.gz'
    内容类型“应用程序/八位字节流”的长度为34880字节(34 KB)
    下载34 KB
  • 正在安装源包'stringi'...
    **пакет'stringi'удачнораспакован,MD5总计проверены
    注意:работающаякоманда'sh ./configure.win'имеетстатус127
    错误:包“stringi”
  • 的配置失败
  • 删除'C:/Users/kozlovpy/Documents/R/win-library/3.2/stringi'
    错误:依赖项“stringi”不适用于程序包“stringr”
  • 删除'C:/Users/kozlovpy/Documents/R/win-library/3.2/stringr'

  • Скачанныеисходникипакетовнаходятсяв
    ‘C:\Users\kozlovpy\AppData\Local\Temp\RtmpgnfwL4\downloaded_pa​​ckages'
    Предупреждения:
    1:работающаякоманда'“C:/PROGRA~1/RRO/R-32~1.2/bin/x64/R”
    CMD安装-l“C:\Users\kozlovpy\Documents\R\win-library\3.2”
    C:\Users\kozlovpy\AppData\Local\Temp\RtmpgnfwL4/downloaded_pa​​ckages/stringi_0.5-5.tar.gz'имеетстатус1
    2:Вinstall.packages(“stringr”,type =“source”):
    установкапакета‘stringi’имеетненулевойстатусвыхода
    3:работающаякоманда'“C:/PROGRA~1/RRO/R-32~1.2/bin/x64/R”
    CMD安装-l“C:\Users\kozlovpy\Documents\R\win-library\3.2”
    C:\Users\kozlovpy\AppData\Local\Temp\RtmpgnfwL4/downloaded_pa​​c
    kages/stringr_1.0.0.tar.gz'имеетстатус1
    4:Вinstall.packages(“stringr”,type =“source”):
    установкапакета‘stringr’имеетненулевойстатусвыхода
  • Github软件包显示了下一个:

  • 选项(install.packages.check.source =“no”)也没有帮助
  • 尝试输入其他存储库-没希望了。

  • 任何猜测我在做什么错?

    最佳答案

    先生,我尝试过:

    install.packages("stringi", dependencies=TRUE, INSTALL_opts = c('--no-lock'))
    install.packages("stringr", dependencies=TRUE, INSTALL_opts = c('--no-lock'))
    

    它为我工作,尝试一下!

    09-03 18:23