Felix Schönbrodt

PD Dr. Dipl.-Psych.

How to check your package with R-devel

In response to an update to ggplot2 (now verson 0.9.2) I had to make some minor changes to our package TripleR. The CRAN maintainers also asked to …

Please also fix other issues that may be apparent in checks with a current R-devel.

Now, how can this be done? Here’s my workflow on Mac OS (might be slightly different on Win or Linux):

  1.   Install R-develparallel to your existing (stable) R version
    1.  Before installation, run one of these lines in the Terminal:
      sudo pkgutil --forget org.r-project.R.Leopard.fw.pkg
      sudo pkgutil --forget org.r-project.R.mavericks.fw.pkg

      (read the messages of the installer which version you are supposed to use), otherwise the installer will overwrite your existing version

    2. Rename your R.app and R64.app or move them temporarily into another folder, as the installer of R-devel probably will replace them by new version that are not compatible with your existing stable R version.
  2.   Use RSwitch to change the active R version
  3.   Install packages which your own packages depends on; you have to do it from source, as the binaries for the R-devel do not exist:
    install.packages("lme4", type="source")
  4.  Check your own package using following flag:
    R CMD check pkg --as-cran
  5. Check if your package also works on Windows using winbuilder

Furthermore, check whether your package follows the CRAN Repository Policies.

PS: Finally, I managed to get rid of the annoying R CMD check warnings like “no visible binding for global variable ‘x'”. These occured due to the ggplot2 syntax. Here‘s a solution.

Visually weighted/ Watercolor Plots, new variants: Please vote!
Parse pdf files with R (on a Mac)
Comments (3) | Trackback

3 Responses to “How to check your package with R-devel”

  1. John says:

    Very nice, concise description. I followed your instructions to get R-devel installed on my OS X install, and had issues with multiple versions. Invariably, I would end up with only one workable version even with your pkgutil command.

    My fix was to first “forget” in the terminal (I had to use sudo to do that also), then, also in the terminal run the installer with:

    sudo installer -pkg ./R-devel-leopard.pkg -target /

    Then everything else worked as advertised.

    Thanks for the tip,
    John

  2. alex says:

    Thanks for this How To!

Leave a Reply

  • Categories

  • Disclaimer: This is a multi-language site.

    This website is a conglomerate of old and new texts - some are in German, some in English. I do not have the time to translate each, so unfortunately this is a mixed-language site. I'm sorry. If you have any questions about the German texts, just write an email! Diese Webseite ist eine Mischung aus deutschen und englischen Texten - leider habe ich nicht die Zeit sie jeweils in die andere Sprache zu √ľbersetzen. Falls Sie Fragen zu einem englischen Text haben k√∂nnen Sie mir gerne eine Email schreiben!