无法在“R”中安装Swirl

时间:2016-10-25 18:44:50

标签: r swirl

请帮助我在R。

中安装和加载swirl

当我输入:

install.packages("swirl")

我明白了:

Installing package into ‘C:/Users/Abdullah/Documents/R/win-library/3.3' (as ‘lib’ is unspecified)
trying URL 'https://ftp.iitm.ac.in/cran/bin/windows/contrib/3.3/swirl_2.4.2.zip'
Content type 'application/zip' length 212366 bytes (207 KB)
downloaded 207 KB

package ‘swirl’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Abdullah\AppData\Local\Temp\RtmpeOgzVN\downloaded_packages

包显示为已安装:

packageVersion("swirl")
  

[1]'2.4.2'

但是当我去加载它时:

library(swirl)

我收到错误:

  

loadNamespace中的错误(j< - i [[1L]],c(lib.loc,.libPaths()),versionCheck = vI [[j]]):     没有名为'R6'的包   错误:'swirl'的包或命名空间加载失败

1 个答案:

答案 0 :(得分:0)

错误“没有名为'R6'的软件包”告诉您还需要安装该软件包。运行install.packages("R6");library(R6)应该处理这个问题。

漩涡包加载testthat包,它加载R6包。由于您没有安装R6,因此无法加载testthat,也无法加载漩涡。