Checklist for R package submission to CRAN

Version: 1.5.0

Below you can find a checklist, which I wrote for my own purposes. It helps me to remember to check everything important before release a new version of R package to CRAN. Maybe you will also find it helpful.

  1. [ ] Update this checklist.
    • [ ] Update the checklist version number.
  2. [ ] See what new Hadley recommends:
  3. [ ] Update R & packages:
    • [ ] R
    • [ ] all R packages
    • [ ] RStudio (stable or preview version).
  4. [ ] Update your package:
    • [ ] Deprecate old functions and arguments with .Deprecated().
    • [ ] Update unit tests.
    • [ ] Update package files:
      • [ ] .rbuildignore
      • [ ] .rinstignore
  5. [ ] Update package documentation:
    • [ ] Update & rebuild MAN pages.
      • [ ] Update package help page.
      • [ ] Update function help pages.
      • [ ] Update function examples.
    • [ ] Update README.md file:
      • [ ] Make change in README.Rmd.
      • [ ] Check & add examples.
      • [ ] Check & add badges.
      • [ ] Check & add external links.
      • [ ] Re-knit the .Rmd into .md.
    • [ ] Check LICENSE file.
    • [ ] Update & rebuild vignettes.
    • [ ] Update & rebuild pkgdown files.
    • [ ] Check spelling in the package with spelling::spell_check_package(".").
    • [ ] Rebuild all documents.
  6. [ ] (Re)deploy demo apps.
    • [ ] Use the newest version of your package.
    • [ ] Update & test demo apps.
      • [ ] Locally.
      • [ ] On shinyapps.io.
      • [ ] On rsconnect.
  7. [ ] Check package:
    • [ ] Use goodpractice::gp().
    • [ ] Check unit tests.
      • [ ] Check unit test coverage.
    • [ ] Check reverse dependencies.
      • [ ] If devtools functions don’t work use:
        tools::dependsOnPkgs().
    • [ ] Import undefined globals.
      • [ ] Use utils::globalVariables() in the package R file.
  8. [ ] Run a R CMD check locally with –as-cran option.
    • [ ] If you got an error regarding qpdf missing, check:
      • [ ] View(Sys.getenv(“PATH”))
      • [ ] Sys.which(Sys.getenv(“R_QPDF”, “qpdf”))
  9. [ ] Run a R CMD check on win-builder
    • [ ] On R release version via devtools::check_win_release().
    • [ ] On R devel version via devtools::check_win_devel().
  10. [ ] Run a R CMD check on Ubuntu.
    • [ ] Use use_travis().
    • [ ] Config builds on R devel and release versions.

      language: R
      cache: packages
      warnings_are_errors: true
      sudo: required
      r:
        - release
        - devel 
  11. [ ] Update cran-comments.md:
    • [ ] Test environments,
    • [ ] R CMD check results (explain ERRORs, WARNINGs, NOTEs).
    • [ ] Downstream dependencies.
    • [ ] Resubmit comments.
  12. [ ] Update DESCRIPTION file:
    • [ ] Update Version field (major.minor.patch.dev).
    • [ ] Update Date field.
    • [ ] Add new co-authors.
  13. [ ] Update NEWS.md file.
    • [ ] Categorize points into:
      • [ ] Major changes.
      • [ ] Minor changes.
      • [ ] Bugfixes.
  14. [ ] Run again a R CMD check locally just to be sure.
    • [ ] Use devtools::check(cleanup = FALSE, args = c('--as-cran')).
  15. [ ] Check vignettes:
    • [ ] Build your package sources
    • [ ] Load them with:
      install.packages(“../packageName_2.0.90002.tar.gz”, repos = NULL, type = “source”)
    • [ ] Use browseVignettes(“packageName”)
  16. [ ] Push all necessary commits to GitHub.
    • [ ] Merge branches if necessary
      Via GitHub website OR Via GIT: git merge –no-ff branch_name
  17. [ ] Submit the package to CRAN.
    • [ ] Use devtools::release(check = TRUE).
    • [ ] Confirm submission via link in the mail.
  18. [ ] Check results of submission:
  19. [ ] Fix what needs to be fixed.
    • [ ] Consider increasing version number.
    • [ ] Check everything again.
    • [ ] Add Resubmission section at the top of cran-comments.md.

      ## Resubmission
      This is a resubmission. In this version I have:
      
      * ...
    • [ ] Push changes to GitHub repo.
    • [ ] Resubmit to CRAN using devtools::submit_cran().

  20. [ ] After successful submission:
    • [ ] Create a new release with tag version on GitHub repo.
      • [ ] Copy and paste the contents of the relevant NEWS.md section into the release notes
    • [ ] Increment the version of the package in the DESCRIPTION file (to X.X.X.9000).
    • [ ] Promote your package
      • [ ] Post on personal blog
      • [ ] Post on Twitter (use #rstats)
      • [ ] R-Bloggers
      • [ ] etc.
  21. [ ] Update this checklist.
    • [ ] Update the checklist version number.
    • [ ] Push new checklist to the homepage.

Related