我正在使用 R 2.15.2,我想安装 tm 包来做一些文本分析。我已经从CRAN 档案中下载了兼容的tm包。我下载了 tm_0.5-9
我尝试使用安装它
install.packages("/Downloads/tm_0.5-9.tar.gz", repos = NULL, type="source", dependencies = TRUE)
并得到以下错误
Installing package(s) into ‘/Documents/R/win-library/2.15’
(as ‘lib’ is unspecified)
ERROR: dependency 'slam' is not available for package 'tm'
* removing '/Documents/R/win-library/2.15/tm'
Warning in install.packages :
running command 'C:/PROGRA~1/R/R-215~1.2/bin/x64/R CMD INSTALL -l "/Documents/R/win-library/2.15" "/Downloads/tm_0.5-9.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘/Downloads/tm_0.5-9.tar.gz’ had non-zero exit status.
因此,我继续从CRAN 档案中下载了兼容的slam包。我下载了slam_0.1-26
我尝试使用安装它
install.packages("/Downloads/slam_0.1-26.tar.gz", repos = NULL, type="source")
并得到以下错误
Installing package(s) into ‘/Documents/R/win-library/2.15’
(as ‘lib’ is unspecified)
* installing *source* package 'slam' ...
** package 'slam' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
**ERROR: compilation failed for package 'slam'**
* removing '/Documents/R/win-library/2.15/slam'
Warning in install.packages :
running command 'C:/PROGRA~1/R/R-215~1.2/bin/x64/R CMD INSTALL -l "/Documents/R/win-library/2.15" "/Downloads/slam_0.1-26.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘/Downloads/slam_0.1-26.tar.gz’ had non-zero exit status
我该如何安装 slam 并最终安装 tm?