Steps for Submitting an R Package to CRAN
-
In DESCRIPTION, increment version number.
-
In NEWS, replace beta development number with new version number.
-
Ensure all checks pass. Locally, run
devtools::check()
to
ensure everything looks OK. Run each of the following to run the check on
the various remote resources and wait for emails (to the "cre" of the
package) to confirm:
-
devtools::check_win()
-
devtools::check_win_oldrelease()
-
devtools::check_win_devel()
-
devtools::check_mac_release()
-
devtools::check_rhub()
(This one tends to produce spurious
notes/warnings/errors.)
-
If there are any outstanding notes/warnings/errors which you have not
eliminated, discuss them in the cran_comments.md file. Update
cran_comments.md for release.
-
Ensure you have no outstanding local changes; commit any changes. (You'll be
adding a tag later, so you want a commit here.)
-
Run
devtools::release()
-
If you have vignettes that compile as PDF, consider adding the
argument
args=c('--compact-vignettes=gs+qpdf')
to
reduce their size.
Once CRAN accepts the submission:
-
Place a tag on the commit the release is based on. (e.g.
git tag
vX.X.X; git push origin vX.X.X
)
-
In DESCRIPTION, append .9001 to the version number to flag the current
version as development.
Home |
Back to blog
This work is licensed under
CC BY-NC 4.0