dependency ‘slam’ is not available when installing TM package

前端 未结 12 1011
盖世英雄少女心
盖世英雄少女心 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:30

    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.

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

    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)

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

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

    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.

    0 讨论(0)
  • 2020-12-05 05:38
    1. Just Install NLP package with dependencies = True

    2. Install tm packaged with dependencies = True

    And things should work out:)

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

    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.

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