1

我能够安装 swirl 包,但是当我给出 library (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

我该如何解决这个问题并加载漩涡包?

4

1 回答 1

0

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

devtools::install_github("r-lib/crayon")
library(crayon)
于 2017-09-18T23:18:09.540 回答