Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R 3.0.1 package build warning

Tags:

r

rstudio

I'm building R packages in R 3.0.1 on a Windows machine, using Rtools30 and the 'Build' tools associated with RStudio, which I assume is tied in with devtools (which is up-to-date). My typical process to build a package is:

  1. Load All
  2. Reoxygenize
  3. Build & Reload
  4. Check
  5. Build Source Package

If everything goes without errors or warnings, I then:

    install.packages("foo.tar.gz", repos=NULL, type="source")

Since upgrading to R 3.0.1, I now get this warning:

   Warning in install.packages : 
      foo.tar.gz is not available (for R version 3.0.1)

I also tried before installing, and it did not get rid of the warning:

    options(install.packages.check.source = FALSE)

Also, I notice this warning when I open the devtools library:

    WARNING: Rtools 3.0 found on the path at c:/Rtools is not compatible with R 3.0.1.

Which is weird, Rtools 3.0 is suppose to be good from R >2.15.1 to R 3.0.x

Any ideas what is going on?

like image 571
ldecicco Avatar asked May 29 '13 14:05

ldecicco


1 Answers

This is RStudio specific, as they wrap and/or changed a lot of functions from the utils for better integration. The problem lies with a call to getDependencies() to check for dependencies. But that function will also check whether the original package exists on CRAN and throws the given warning when it doesn't. A package you just built on your own computer is obviously not on CRAN, hence the warning.

In the source of the native install.packages(), getDependencies() isn't called in case you build from source or install from a different repository respectively. RStudio on the other hand calls getDependencies() before it passes everything on to the native install.packages() function.

This has to my knowledge no further effects, apart from confusing people. I didn't find a way to conveniently get rid of this in RStudio, as suppressWarnings() doesn't work in this context due to the complex way RStudio deals with this.

In a basic R console, you shouldn't have any problem.

So for the time being, I'd just ignore this and hope the RStudio team finds time to take care of this minor glitch.

like image 193
Joris Meys Avatar answered Nov 14 '22 22:11

Joris Meys