Dependency 'Slam' Is Not Available When Installing Tm Package

install.packages( tm ) - dependency 'slam' is not available

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).

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/

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

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))

Unable to install tm package in R-Studio even though dependencies are set to TRUE

Are you installing in UNIX?

Can you try to download the package from : (I tried and I manage to download it)

https://cran.r-project.org/web/packages/Rpoppler/index.html

Then try to install the tar.gz file offline? (ie. Tools -> Install Packages)

Can't install tm , NLP or slam package on R 3.3.2 (macOS Sierra)

Ok, something weird was wrong.

R uses this line to determine the architectures:

archs  <- dir(file.path(R.home("bin"), "exec"))

As seen here: src/library/toolsR/install.R#1479

In my case the bin/exec directory could be found here:

> R.home("bin/exec")
[1] "/usr/local/Cellar/r/3.3.2/R.framework/Resources/bin/exec"

For some reason that directory contained a R.html file with the contents NA.
This was causing R to think there was an architecture called R.html.

After removing the file I was able to install everything.



Related Topics



Leave a reply



Submit