0

The following is log of R CMD check package error:

* using log directory 'C:/Users/erdogan/Documents/Revolution/causfinder.Rcheck'
* using R version 2.15.3 (2013-03-01)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: CP1254
* checking for file 'causfinder/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'causfinder' version '1.0'
* checking package namespace information ... OK
* checking package dependencies ... ERROR
Packages required but not available:
  'combinat' 'gtools' 'calibrate' 'scales'

See the information on DESCRIPTION files in the chapter 'Creating R packages' of the 'Writing R Extensions' manual.

In my description file, I have all the required files ('combinat' 'gtools' 'calibrate' 'scales') under "Depends:" heading.

What I did till now: I added the above packages under "Suggests:" as well.

Though that the error is sticky.

>.libPaths()
[1] "C:/Revolution/R-Enterprise-7.1/R-3.0.2/library"

I checked both within and outside R:

> devtools::check("C:/Revolution/R-Enterprise-7.1/R-3.0.2/library/causfinder")

From Command Prompt (Windows 7):

C:\Users\erdogan\Documents\Revolution>R CMD check causfinder
* using log directory 'C:/Users/erdogan/Documents/Revolution/causfinder.Rcheck'
* using R version 2.15.3 (2013-03-01)
* using platform: i386-w64-mingw32 (32-bit)
* using session charset: CP1254
* checking for file 'causfinder/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'causfinder' version '1.0'
* checking package namespace information ... OK
* checking package dependencies ... ERROR
Packages required but not available:
  'combinat' 'gtools' 'calibrate' 'scales'

See the information on DESCRIPTION files in the chapter 'Creating R    
packages' of the 'Writing R Extensions' manual.

I also observed the following interesting situation: in the log file, R version is specified as 2.15.3; however, when I do the following, I got different R version!

> R.Version()  
$platform  
[1] "i386-w64-mingw32"  

$version.string  
[1] "R version **3.0.2** (2013-09-25)"  

Any help will be greatly appreciated.

Erdogan CEVHER
  • 1,788
  • 1
  • 21
  • 40
  • You're better off sticking with `devtools::check()` because it makes sure to use the same version of R that you're running. But you seem to be giving it a path to an installed package, not a source package. – hadley Jul 31 '14 at 11:55
  • So, are you suggesting devtools::check("C:/Users/erdogan/Documents/Revolution/causfinder_1.0.tar.gz") ?? – Erdogan CEVHER Jul 31 '14 at 12:00
  • No, the path where the source of your package is - i.e. the directory that contains `DESCRIPTION`, `R/` etc. – hadley Jul 31 '14 at 12:01
  • Update your system path to point to your most recent version of R (in Start Menu, search for "environment variables"), then reopen Command Prompt and `R CMD check` (on the built package .tar.gz) should work. – Thomas Jul 31 '14 at 12:09
  • Thanks; devtools::check("C:/Users/erdogan/Documents/Revolution/causfinder_1.0.tar.gz") Error: C:/Users/erdogan/Documents/Revolution/causfinder_1.0.tar.gz is not a directory Then I did the following: devtools::check("C:/Users/erdogan/Documents/Revolution/causfinder") This time; devtools uses R 3.0.2 and it gave no package error, but some other errors. I hope I will solve the remaining errors. – Erdogan CEVHER Jul 31 '14 at 12:10
  • Upon Thomas'offer: "R CMD check causfinder" from MS DOS: * using R version 3.1.0 (2014-04-10) * using platform: i386-w64-mingw32 (32-bit) * using session charset: CP1254 * checking package dependencies ... ERROR Packages required but not available: combinat, gtools, calibrate, scales Depends: includes the non-default packages: lavaan,Matrix,boot,accuracy,np,cubature,combinat,gtools,calibrate,RColorBrewer,scales,grid Adding so many packages to the search path is excessive and importing selectively is preferable. BUT: I used ALL these packages in my developments of functions! – Erdogan CEVHER Jul 31 '14 at 12:36
  • 1
    @ErdoganCEVHER You don't need to add packages to your path. You clearly have two versions of R on your machine (2.15.3 and 3.0.2). Command Prompt will run `R CMD check` for whatever is listed first on your search path. If you're developing in 3.0.2 (which you are) and checking with 2.15.3 (which you are, probably because it's listed first on your path, or its the only version listed on your path), that's why you're encountering these errors. – Thomas Jul 31 '14 at 14:16
  • Easiest solution on windows is usually starting virtualbox and some ubuntu desktop guest, then utilizing docker and many other automation tools. – jangorecki Jan 23 '16 at 00:54

0 Answers0