brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
submit-to-cranComplete procedure for submitting an R package to CRAN, including pre-submission checks (local, win-builder, R-hub), cran-comments.md preparation, URL and spell checking, and the submission itself. Covers first submissions and updates. Use when a package is ready for initial CRAN release, when submitting an updated version of an existing CRAN package, or wh…
Independent GitHub snapshot · Automated classification · Original documentation governs
Execute full CRAN submission workflow from pre-flight checks through submission.
R CMD check with 0 errors and 0 warningsVerify DESCRIPTION has correct version:
desc::desc_get_version()
Verify NEWS.md has entry for this version. Entry should summarize user-facing changes.
Got: Version follows semantic versioning. NEWS.md has matching entry for this version.
If fail: Update version with usethis::use_version() (choose "major", "minor", or "patch"). Add NEWS.md entry summarizing user-facing changes.
devtools::check()
Got: 0 errors, 0 warnings, 0 notes (1 note acceptable for new submissions: "New submission").
If fail: Fix all errors and warnings before proceeding. Read check log at <pkg>.Rcheck/00check.log for details. Notes should be explained in cran-comments.md.
devtools::spell_check()
Add legitimate words to inst/WORDLIST (one word per line, sorted alphabetical).
Got: No unexpected misspellings. All flagged words either corrected or added to inst/WORDLIST.
If fail: Fix genuine misspellings. Legitimate technical terms? Add to inst/WORDLIST (one word per line, alphabetical sorted).
urlchecker::url_check()
Got: All URLs return HTTP 200. No broken or redirected links.
If fail: Replace broken URLs. Use \doi{} for DOI links instead of raw URLs. Remove links to resources no longer exist.
devtools::check_win_devel()
devtools::check_win_release()
Wait for email results (usual 15-30 minutes).
Got: 0 errors, 0 warnings on both Win-builder release and devel. Results arrive by email within 15-30 minutes.
If fail: Address platform-specific issues. Common causes: different compiler warnings, missing system dependencies, path separator differences. Fix local, re-submit to Win-builder.
rhub::rhub_check()
Checks on multiple platforms (Ubuntu, Windows, macOS).
Got: All platforms pass with 0 errors and 0 warnings.
If fail: Specific platform fails? Check R-hub build log for platform-specific errors. Use testthat::skip_on_os() or conditional code for platform-dependent behavior.
Create or update cran-comments.md in package root:
## R CMD check results
0 errors | 0 warnings | 1 note
* This is a new release.
## Test environments
* local: Windows 11, R 4.5.0
* win-builder: R-release, R-devel
* R-hub: ubuntu-latest (R-release), windows-latest (R-release), macos-latest (R-release)
## Downstream dependencies
There are currently no downstream dependencies for this package.
Updates? Include:
Got: cran-comments.md accurately summarizes check results across all test environments and explains any notes.
If fail: Check results differ across platforms? Document all variations. CRAN reviewers will check these claims against own tests.
# One last check
devtools::check()
# Verify the built tarball
devtools::build()
Got: Final devtools::check() passes clean. .tar.gz tarball built in parent directory.
If fail: Last-minute issue appears? Fix, re-run all checks from Step 2. Never submit with known failures.
devtools::release()
Runs interactive checks and submits. Answer all questions honest.
Alternatively, submit manual at https://cran.r-project.org/submit.html by uploading tarball.
Got: Confirmation email from CRAN arrives within minutes. Click confirmation link to finalize submission.
If fail: Check email for rejection reasons. Common issues: examples too slow, missing \value tags, non-portable code. Fix issues, re-submit, note in cran-comments.md what changed.
After acceptance:
# Tag the release
usethis::use_github_release()
# Bump to development version
usethis::use_dev_version()
Got: GitHub release created with accepted version tag. DESCRIPTION bumped to development version (x.y.z.9000).
If fail: GitHub release fails? Create manual with gh release create. CRAN acceptance delayed? Wait for confirmation email before tagging.
R CMD check returns 0 errors, 0 warnings on local machinecran-comments.md accurate describes check results\donttest{}. CRAN enforces time limits..Rbuildignore)\value in docs: All exported functions need @return tag.Renvironrevdepcheck::revdep_check()# Full pre-submission workflow
devtools::spell_check()
urlchecker::url_check()
devtools::check()
devtools::check_win_devel()
rhub::rhub_check()
# Wait for results...
devtools::release()
release-package-version - version bumping, git taggingwrite-roxygen-docs - ensure documentation meets CRAN standardssetup-github-actions-ci - CI checks that mirror CRAN expectationsbuild-pkgdown-site - documentation site for accepted packages