install.packages(“ tm”)-> “依赖性'slam'不可用” [英] install.packages("tm") -> "dependency 'slam' is not available"

查看:104
本文介绍了install.packages(“ tm”)-> “依赖性'slam'不可用”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在IBM的Data Science Experience(DSX)上安装 tm 软件包:

I'm trying to install the tm package on IBM's Data Science Experience (DSX):

install.packages("tm")

不过,我是遇到此问题:

However, I'm hitting this issue:

"dependency 'slam' is not available"

帖子建议使用R版本 3.3.1将解决该问题,但是DSX上的R版本是: R版本3.3.0(2016-05-03)

This post suggests that R version 3.3.1 will resolve the issue, however the R version on DSX is: R version 3.3.0 (2016-05-03)

如何在IBM DSX上解决此问题?请注意,您没有DSX的root访问权限。

How can I resolve this issue on IBM DSX? Note that you don't have root access on DSX.

我在stackoverflow上也遇到过类似的问题,但是没有人问如何在IBM DSX上解决此问题。 安装TM软件包时,依赖项 slam不可用

I've seen similar questions on stackoverflow, but none are asking how to fix the issue on IBM DSX, e.g. dependency ‘slam’ is not available when installing TM package

更新:

install.packages("slam")

返回值:

Installing package into '/gpfs/global_fs01/sym_shared/YPProdSpark/user/s85d-88ebffb000cc3e-39ca506ba762/R/libs'
(as 'lib' is unspecified)
Warning message:
"package 'slam' is not available (for R version 3.3.0)"


推荐答案

如果尝试安装 slam install.packages(),则将使用CRAN中的0.1.40版本。根据您的错误和该库的description文件,它具有对R(> = 3.3.1)的依赖。

If you try to install slam with install.packages(), then the version 0.1.40 will be used from CRAN. According to your error and the DESCRIPTION file of the library, it has the dependency on R (>= 3.3.1).

如果<$ c $的旧版本c> slam 对您很有用,然后您可以从CRAN归档文件中安装它。参见 https://cran.r-project.org/src/contrib/Archive / slam /

If a older version of slam is useful for you, then you can install it from the CRAN archives. See https://cran.r-project.org/src/contrib/Archive/slam/

根据 tm 的文档,它依赖于slam(≥ 0.1-31)。参见 https://cran.r-project.org/web/packages/ tm / index.html

According to the documentation for tm, it has a dependency on slam (≥ 0.1-31). See https://cran.r-project.org/web/packages/tm/index.html

以前的版本依赖于较旧的R版本。以下代码对我有用,可以在DSX上安装 slam_0.1.37

Previous versions have a dependency on older R versions. The following code worked for me to install slam_0.1.37 on DSX:

library(devtools)
install_url("https://cran.r-project.org/src/contrib/Archive/slam/slam_0.1-37.tar.gz")

# test slam
library(slam)
a <- as.simple_sparse_array(1:3)
a
extend_simple_sparse_array(a, c( 0L, 1L))

这篇关于install.packages(“ tm”)-&gt; “依赖性'slam'不可用”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆