如果安装程序不起作用,如何更新R版本?

时间:2018-09-24 16:47:40

标签: r installr

我试图更新我的R版本(3.4.3,有点旧),但是当我尝试安装“安装程序”软件包并加载它时,却出现了错误

> install.packages("installr")
trying URL 
'https://cran.rstudio.com/bin/windows/contrib/3.4/installr_0.20.0.zip'
Content type 'application/zip' length 265893 bytes (259 KB)
downloaded 259 KB

package ‘installr’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\abc001\AppData\Local\Temp\RtmpKUhjgr\downloaded_packages

> require(installr)
 Loading required package: installr
Loading required package: stringr
Error: package or namespace load failed for ‘stringr’ in library.dynam(lib, 
package, package.lib):
DLL ‘stringi’ not found: maybe not installed for this architecture?
Failed with error:  ‘package ‘stringr’ could not be loaded’
In addition: Warning messages:
1: package ‘installr’ was built under R version 3.4.4 
2: package ‘stringr’ was built under R version 3.4.4 

阅读错误后,我想我当前的问题是'installr'需要'stringr',但它们基于3.4.4构建。那么,如果“安装程序”依赖于新的R版本(至少3.4.4)但我的当前版本是(3.4.3),那么现在如何更新我的R版本?

谢谢!

1 个答案:

答案 0 :(得分:1)

尝试安装stringi库。

install.packages("stringi")

然后重试安装程序。

require(installr)