加载Swirl包时出现问题

时间:2017-09-18 22:51:27

标签: r swirl

我能够安装漩涡包,但是当我给出库(漩涡)命令时,会出现以下错误:

Error: package or namespace load failed for ‘swirl’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘crayon’

所以我尝试安装蜡笔包,它出现了:

* installing *source* package 'crayon' ...
** package 'crayon' successfully unpacked and MD5 sums checked
Warning in file(file, if (append) "a" else "w") :
  cannot open file 'C:/Users/Tams/Documents/R/win-library/3.4/crayon/DESCRIPTION': No such file or directory
Error in file(file, if (append) "a" else "w") : 
  it's not possible to open the conection
ERROR: installing package DESCRIPTION failed for package 'crayon'
* removing 'C:/Users/TAÍS/Documents/R/win-library/3.4/crayon'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\TAÍS\Documents\R\win-library\3.4" C:\Users\TAS~1\AppData\Local\Temp\Rtmpc9eX85/downloaded_packages/crayon_1.3.4.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘crayon’ had non-zero exit status

如何解决此问题并加载漩涡包?

1 个答案:

答案 0 :(得分:0)

尝试直接从Github加载它,看它是否解决了问题。您可能希望在此之前重新启动R的实例,以确保一切都在世界上。

devtools::install_github("r-lib/crayon")
library(crayon)