简体   繁体   中英

Problems loading the Swirl package

I was able to install the swirl package, but when I give the library (swirl) command, the following error appears:

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’

So I try to install the crayon package and it appears:

* 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

How can I solve this problem and load the swirl package?

Try loading it directly from Github and see if it solves the problem. You may want to restart your instance of R prior to this to ensure that all is right in the world.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM