首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在R Studio中加载SWIRL包

无法在R Studio中加载SWIRL包
EN

Stack Overflow用户
提问于 2015-10-31 21:27:48
回答 1查看 358关注 0票数 0

在加载swirl包时,我收到以下错误

代码语言:javascript
复制
library("swirl", lib.loc="~/R/x86_64-pc-linux-gnu-library/3.2")
Error : .onAttach failed in attachNamespace() for 'swirl', details:
call: str_c(..., sep = " ")
error: lazy-load database '/home/ganesh/R/x86_64-pc-linux-gnu-library  /3.2/stringi/R/stringi.rdb' is corrupt
In addition: Warning messages:
1: In str_c(..., sep = " ") : restarting interrupted promise evaluation
2: In str_c(..., sep = " ") : internal error -3 in R_decompress1
Error: package or namespace load failed for ‘swirl’

如你所见,R版本是3.2,它运行在Ubuntu 15.04 64位上。

请求您的帮助。

谢谢

Ganesh

EN

回答 1

Stack Overflow用户

发布于 2015-10-31 22:20:59

Ubuntu 15.04也在这里,一切都很好:

代码语言:javascript
复制
edd@max:~$ install.r swirl          ## install.r is part of littler
trying URL 'https://cran.rstudio.com/src/contrib/swirl_2.2.21.tar.gz'
Content type 'application/x-gzip' length 51037 bytes (49 KB)
==================================================
downloaded 49 KB

* installing *source* package ‘swirl’ ...
** package ‘swirl’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (swirl)

The downloaded source packages are in
        ‘/tmp/downloaded_packages’
edd@max:~$ r -e 'library(swirl); cat("All OK\n")'

| Hi! I see that you have some variables saved in your workspace. To keep
| things running smoothly, I recommend you clean up before starting swirl.

| Type ls() to see a list of the variables in your workspace. Then, type
| rm(list=ls()) to clear your workspace.

| Type swirl() when you are ready to begin.

All OK
edd@max:~$

正如您所看到的,这个包在这里安装得很干净,不需要任何依赖(可能是因为我已经安装了相当数量的包),加载也很好。

我经常从命令行安装和测试,并使用littler中的install.r包装器--如果您想先安装它,请使用sudo apt-get install littler

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33452139

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档