Preface

Motivation

Introduction

The CRAN Cookbook has been developed as part of a special project grant from the R Consortium in 2024. The proposal is titled: Improving the Skills of R Package Maintainers. The goals of the project are:

  1. Educate a diverse cohort of young R developers to acquire the technical knowledge and skills required to participate in the continuous integration of R packages into the R ecosystem.
  2. Develop a new documentation solution with a Quarto website that is user-friendly for new R package maintainers on CRAN.
  3. Identify common CRAN submission issues and create a framework of “problems” and “solutions” that are easy to implement and discover.

Prerequisite

  • Beginner to intermediate knowledge of R Programming: This guide is designed to assist both first-time R package maintainers and those with experience who prefer to navigate a curated selection of the most common issues encountered when submitting to CRAN, as identified by CRAN Maintainers. It provides a ‘best practices’ approach to resolving R package issues to facilitate a successful re-submission to CRAN.

  • While not required, it’s useful to have experience in debugging code. Submitting your R package to CRAN is a multi-step process that may involve communicating with multiple CRAN volunteers and updating your code, tests, examples, documentation, and other supplementary files to meet acceptance criteria. Developing strong debugging skills can be particularly valuable during this process, as it can help you effectively apply the examples in this cookbook to create custom solutions for updating your R package.

Acknowledgement

  • Thank you to the R Consortium for funding and sponsoring this project!

Contributors

Thank you to all contributors!

If you are looking to make a contribution to the CRAN Cookbook please see our contributors guide.

Colophon

This cookbook is a Quarto website. To learn more about Quarto websites visit https://quarto.org/docs/websites. The cookbook is hosted on GitHub pages as part of the Community R development resources. The website is currently deployed with local commands.

Session info

if (!requireNamespace("devtools", quietly = TRUE)) {
    install.packages("devtools")
}
library(devtools)
Loading required package: usethis
devtools::session_info()
─ Session info ───────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.4.2 (2024-10-31)
 os       Ubuntu 22.04.5 LTS
 system   x86_64, linux-gnu
 ui       X11
 language (EN)
 collate  C.UTF-8
 ctype    C.UTF-8
 tz       UTC
 date     2024-11-25
 pandoc   3.2 @ /opt/quarto/bin/tools/ (via rmarkdown)

─ Packages ───────────────────────────────────────────────────────────────────
 ! package     * version date (UTC) lib source
 P cachem        1.1.0   2024-05-16 [?] RSPM (R 4.4.0)
 P cli           3.6.3   2024-06-21 [?] RSPM (R 4.4.0)
 P devtools    * 2.4.5   2022-10-11 [?] RSPM (R 4.4.0)
 P digest        0.6.37  2024-08-19 [?] RSPM (R 4.4.0)
 P ellipsis      0.3.2   2021-04-29 [?] RSPM (R 4.4.0)
 P evaluate      1.0.0   2024-09-17 [?] RSPM (R 4.4.0)
 P fastmap       1.2.0   2024-05-15 [?] RSPM (R 4.4.0)
 P fs            1.6.4   2024-04-25 [?] RSPM (R 4.4.0)
 P glue          1.8.0   2024-09-30 [?] RSPM (R 4.4.0)
 P htmltools     0.5.8.1 2024-04-04 [?] RSPM (R 4.4.0)
 P htmlwidgets   1.6.4   2023-12-06 [?] RSPM (R 4.4.0)
 P httpuv        1.6.15  2024-03-26 [?] RSPM (R 4.4.0)
 P jsonlite      1.8.9   2024-09-20 [?] RSPM (R 4.4.0)
 P knitr         1.48    2024-07-07 [?] RSPM (R 4.4.0)
 P later         1.3.2   2023-12-06 [?] RSPM (R 4.4.0)
 P lifecycle     1.0.4   2023-11-07 [?] RSPM (R 4.4.0)
 P magrittr      2.0.3   2022-03-30 [?] RSPM (R 4.4.0)
 P memoise       2.0.1   2021-11-26 [?] RSPM (R 4.4.0)
 P mime          0.12    2021-09-28 [?] RSPM (R 4.4.0)
 P miniUI        0.1.1.1 2018-05-18 [?] RSPM (R 4.4.0)
 P pkgbuild      1.4.4   2024-03-17 [?] RSPM (R 4.4.0)
 P pkgload       1.4.0   2024-06-28 [?] RSPM (R 4.4.0)
 P profvis       0.3.8   2023-05-02 [?] RSPM (R 4.4.0)
 P promises      1.3.0   2024-04-05 [?] RSPM (R 4.4.0)
 P purrr         1.0.2   2023-08-10 [?] RSPM (R 4.4.0)
 P R6            2.5.1   2021-08-19 [?] RSPM (R 4.4.0)
 P Rcpp          1.0.13  2024-07-17 [?] RSPM (R 4.4.0)
 P remotes       2.5.0   2024-03-17 [?] RSPM (R 4.4.0)
   renv          1.0.7   2024-04-11 [1] RSPM (R 4.4.2)
 P rlang         1.1.4   2024-06-04 [?] RSPM (R 4.4.0)
 P rmarkdown     2.28    2024-08-17 [?] RSPM (R 4.4.0)
 P sessioninfo   1.2.2   2021-12-06 [?] RSPM (R 4.4.0)
 P shiny         1.9.1   2024-08-01 [?] RSPM (R 4.4.0)
 P stringi       1.8.4   2024-05-06 [?] RSPM (R 4.4.0)
 P stringr       1.5.1   2023-11-14 [?] RSPM (R 4.4.0)
 P urlchecker    1.0.1   2021-11-30 [?] RSPM (R 4.4.0)
 P usethis     * 3.0.0   2024-07-29 [?] RSPM (R 4.4.0)
 P vctrs         0.6.5   2023-12-01 [?] RSPM (R 4.4.0)
 P xfun          0.48    2024-10-03 [?] RSPM (R 4.4.0)
 P xtable        1.8-4   2019-04-21 [?] RSPM (R 4.4.0)
 P yaml          2.3.10  2024-07-26 [?] RSPM (R 4.4.0)

 [1] /home/runner/work/cran-cookbook/cran-cookbook/renv/library/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu
 [2] /home/runner/.cache/R/renv/sandbox/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu/db5e602d

 P ── Loaded and on-disk path mismatch.

──────────────────────────────────────────────────────────────────────────────
Back to top