[R-pkg-devel] Undocumented requirement for CRAN

hugo@gruso@+R m@iii@g oii @orm@iesup@org hugo@gruso@+R m@iii@g oii @orm@iesup@org
Tue Sep 13 09:11:36 CEST 2022


Dear Jirka,

You can find such lists in community efforts such as:

- The rOpenSci devguide: 
https://devguide.ropensci.org/building.html#crangotchas

- The "prepare-for-cran" repo from ThinkR: 
https://github.com/ThinkR-open/prepare-for-cran

(Note that some of these tips might be slightly out-of-date in the sense 
that R CMD check now includes tests for them. The recommendations are 
still valid though.)

You may also find useful to follow the checklist produced by 
usethis::use_release_issue() to prepare your release.

Hope this helps!

Hugo


On 13/09/2022 00:42, Jiří Moravec wrote:
> There are quite a lot of undocumented requirement for CRAN.
> This bite me several times already.
> 
> They are not documented in the 
> https://cran.r-project.org/doc/manuals/R-exts.html
> Nor they are marked by `R CMD check`
> 
> Ideally, these would be documented AND flagged by R CMD check.
> Otherwise, it is a waste of time for both CRAN team and package developers.
> 
> So far, the undocumented requirements that were flagged for me are:
> 
> * Documenting return value even for functions without return value
>    -- This is even contrary to the base code (i.e., many graphical 
> functions do not document return values)
> 
> * Commented code in examples
> 
> * Examples for non-exported internal functions
>    -- I understand that this is related to the fact that any ::: is 
> highly discouraged (which is documented) and that examples for 
> unexported functions cannot be run without ::: .
>       But I like the idea of using properly documented internal 
> functions and usage of examples as for rudimentary testing.
> 
> 
> Are there any other undocumented requirements?
> 
> (we could maybe create PR for `.check_packages*` so that these problems 
> are flagged by `R CMD check`)
> 
> -- Jirka
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list