R Package Resources

Random Notes

  • To rebuild the package after making changes: devtools::document()

  • Update packages listed in Imports in the DESCRIPTION file with the most recent version number: usethis::use_latest_dependencies(overwrite = TRUE, source = "CRAN")

  • To propogate imported packages in the NAMESPACE auto-generated file, I created a R/<em>package name</em>-package.R file that includes the necessary packages with @imports <em>package</em> lines. See, e.g. here.

  • To be accepted by CRAN, your package must have 0 errors and 0 warnings. Notes are discouraged.

  • Line to build and check package locally before CRAN submission R CMD build . && R CMD check $(ls -t . | head -n1) --as-cran