R CMD检查错误:需要包但不可用

jac*_*ger 5 packaging r

我正在尝试创建一个包.这取决于几个包.我将导入添加到命名空间文件中,并将Depends添加到描述文件中.

我在这里这里找到了可能的解决方案,但这些都没有用 - 我想因为我在CentOS上.

这就是我在屏幕上看到的内容:

[hadoop@localhost RProjects]$ sudo R CMD check TextPreProcess
* using log directory ‘/home/hadoop/RProjects/TextPreProcess.Rcheck’
* using R version 2.15.1 (2012-06-22)
* using platform: x86_64-redhat-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘TextPreProcess/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘TextPreProcess’ version ‘1.0’
* checking package namespace information ... OK
* checking package dependencies ... ERROR
Packages required but not available:
  ‘RWeka’ ‘Snowball’ ‘lsa’ ‘plyr’ ‘snowfall’ ‘tau’ ‘tm’

See the information on DESCRIPTION files in the chapter ‘Creating R
packages’ of the ‘Writing R Extensions’ manual.
Run Code Online (Sandbox Code Playgroud)

我经历了写作R Extentions但我无法从如何解决我的问题中获得很多见解.

jac*_*ger 3

现在正在工作。

我所做的是:

  1. 添加~/R/x86_64-redhat-linux-gnu-library/2.15到 .libPaths (那是我的 R 库所在的位置)
  2. 分离 R 中的所有库
  3. 重新启动 R 会话。(对于多个会话,请关闭所有会话。)
  4. 安装所需的软件包。
  5. 检查命名空间文件中的导入和导出是否正确。
  6. 检查描述文件中是否提供必填字段。确保“依赖”、“导入”、“建议”和“增强”之间的所有依赖关系均得到处理。
  7. 检查了它。R CMD check <pkg>。建造了它。R CMD build <pkg>。安装了。R CMD INSTALL <tarball>
  8. 完毕。