Having recently gone through the process of submitting a package to CRAN, I learned a number of things through the multiple submissions that will get my next package (or yours) published faster.

  1. Most of the package licenses are GPL and require no additional text in the DESCRIPTION file. I chose to license under MIT. In this case, you need to specify License: MIT + file LICENSE in the DESCRIPTION file and add a file called LICENSE specifying the YEAR and COPYRIGHT HOLDER.
  2. Overcoming packagename : <anonymous>: no visible binding for global variable ‘varname’  – I declared a variable with global scope in my package and used it before assigning a value to it. As soon as I initialize the variable, the message disappeared.
  3. More URL links in the documentation. For example, I referenced node.js in the Description field of the DESCRIPTION file and was asked to include a URL point to the node.js home page.
  4. devtools::run_examples() is your friend. Most of my errors were in the #' @examples section. Instead of R CMD check, executing run_examples only does that part of the check and does it quickly.
  5. Have examples that work and execute without warnings or errors, not enclosed in \dontrun{} blocks.
  6. Add tests – the more the better. Use the testthat package for the testing framework.
  7. It doesn’t seem possible to include an extra file that is not part of the R package to be used for the examples.
  8. New rules are added without wide-reaching notification. Subscribe to the R-package-devel mailing list to get the latest set of rules.
  9. Using any routine that is not part of the base package must now be explicitly specified in the NAMESPACE file. When doing this, care must be taken as Roxygen also writes/rewrites that file.
  10. devtools::build_win() is your other best friend. It provides another environment (Win32/64) to test your package and has a more realistic test environment that is a better match to what the CRAN maintainers use than what exists on my local machine.
  11. To gain insight into the maintainer environment, add some R command in your package script in the examples section. These statements will get executed and you will receive a link to the output.
  12. Wait a day before attempting to submit again.