dependency ‘slam’ is not available when installing TM package

一笑奈何 提交于 2019-11-28 05:51:27
student

For R-version 3.2.3, following worked fine as mentioned in this link and it suggests this works for R-version 3.3.0 as well:

#install devtools if you have not installed 
install.packages('devtools')
library(devtools)

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

I found a hint at this german site about R under Install additional R packages ("Zusätzliche R-Pakete installieren") After I installed slam seperatly over apt-get for example:

sudo apt-get install r-cran-slam

I could install tm the normal way:

install.packages('tm')

And load the library aswell.

I hope my answer helps someone.

I had the same problem as you.
Slam "Depends: R (≥ 3.3.1)", this why I had to perform the following actions to successfully install and load "tm" package:

  1. Update R from 3.2.5 to the latest version 3.3.2
  2. install.packages("tm")
    also installing the dependencies ‘NLP’, ‘slam’ package ‘NLP’ successfully unpacked and MD5 sums checked package ‘slam’ successfully unpacked and MD5 sums checked package ‘tm’ successfully unpacked and MD5 sums checked

  3. library(tm)

Eduardo

I had the same problem and:

  • I upgraded RStudio to the latest version (1.0.143)
  • I upgraded R to the latest version (R.3.3.3)
  • I rebooted Rstudio
  • I installed again in RStudio the package "tm"
  • I ran library(tm)

and everything works fine now.

The latest version of the package "slam" only works for R(>=3.4.0),so you can try either updating your R to the latest version or downloading an early version of the "slam" package.

This is a download link from CRAN for early version of "slam" package: https://cloud.r-project.org/bin/macosx/mavericks/contrib/3.3/slam_0.1-40.tgz.

I used the following code to install the binary or the older version of slam. It worked for me.

install.packages("slam", type = "binary")

Apparently the problem seems to be the version of R you are using. Try installing the latest version of R, 3.3.1. That should take care of it.

I am using R3.2.5. I was trying to install "tm". I did install NLP as a dependency but gave me an error :

"package ‘slam’ is not available (for R version 3.2.5)"

The option I had to was to download the zip/tar/gz file(binaries) from https://cran.r-project.org/web/packages/slam/index.html and install the package. It worked for me after that. Although I am not sure what the problem is because the library information mentions it is for R (≥ 3.3.1)

I also had to upgrade to the most recent version of R.

Specifically, on Ubuntu 16.04 here are instructions to get the up to date R version.

I faced this error while installing the "tm" package on R version 3.3.0. Seems like some missing libraries. After I could install the latest version 3.4.1 , i was able to install the package "tm" which installed the 'slam' on its own. Hope this may help somebody.

saleem
  1. Just Install NLP package with dependencies = True

  2. Install tm packaged with dependencies = True

And things should work out:)

ravindar madishetty

For any such type of issue regarding package not installed, update your R and later reinstall the package. These are the steps you follow:

if(!require(installr)){ install.packages("installr")}

require(installr)}    #load the package

updateR()
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!