hadley/devtools — pull request #205 by wch (2012-12-11 19:11:29+00:00)
Title: check_cran(): use check_r_cmd() instead of R()

The purpose of this series of commits its to make it possible for `check_cran` to use the internal `check_r_cmd` function, so that it's easier to use the same framework for setting environment variables related to R CMD check. This will be useful for simulating CRAN more closely.

Notes:

* The reason for calling `check_r_cmd` instead of `check` is that `check` uses stuff related to the package object, whereas `check_r_cmd` does not. (Actually, `check_r_cmd` did get the name from the package object, but that wasn't necessary so I took it out.)

* `check_r_cmd` now gets the name of the package from the name of the input tar file.

* `check_r_cmd` now can take an argument for the destination directory.