Error in R CMD Check: packages are necessary but not available

I am trying to create a package. It depends on several packages. I added import to the namespace file, and Depends to the description file.

I found possible solutions here and here , but this did not work - I think because I am on CentOS.

This is what I see on the screen:

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

I went through Writing R Extentions, but I could not get much information on how to solve my problem.

+4
source share
1 answer

Now it works.

What I've done:

  • add ~/R/x86_64-redhat-linux-gnu-library/2.15 to .libPaths (which is where my R library was)
  • Detach all libraries in R
  • Restart session R. (Close all of them for multiple sessions.)
  • install the necessary packages.
  • Verify that the import and export in the namespace file are correct.
  • Check if the required fields are available in the description file. Make sure all dependencies are handled between Depends, Import, Suggests, and Gain.
  • Checked. R CMD check <pkg> . Built it. R CMD build <pkg> . Installed it. R CMD INSTALL <tarball> .
  • Done.
+2
source

All Articles