dependency ‘slam’ is not available when installing TM package

前端 未结 12 1010
盖世英雄少女心
盖世英雄少女心 2020-12-05 05:02

I was able to use the library(tm) in r without problem until today, when loading tm shows:

library(tm)
相关标签:
12条回答
  • 2020-12-05 05:16

    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.

    0 讨论(0)
  • 2020-12-05 05:17

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

    install.packages("slam", type = "binary")
    
    0 讨论(0)
  • 2020-12-05 05:21

    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.

    0 讨论(0)
  • 2020-12-05 05:22

    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)
    
    0 讨论(0)
  • 2020-12-05 05:27

    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)

    0 讨论(0)
  • 2020-12-05 05:29

    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.

    0 讨论(0)
提交回复
热议问题