openstatsware
Workshop: Good Software Engineering Practice for R Packages
October 17, 2023
pkgdown
pkgdown
pkgdown
makes it quick and easy to build a website for your packagepkgdown
, run usethis::use_pkgdown()
to get started_pkgdown.yml
filereference
section with names of .Rd
files_pkgdown.yml
File---
url: https://openpharma.github.io/mmrm
template:
bootstrap: 5
params:
ganalytics: UA-125641273-1
navbar:
right:
- icon: fa-github
href: https://github.com/openpharma/mmrm
reference:
- title: Package
contents:
- mmrm-package
- title: Functions
contents:
- mmrm
- fit_mmrm
- mmrm_control
- fit_single_optimizer
- refit_multiple_optimizers
- df_1d
- df_md
- component
gh-pages
, stores the rendered websitemain
branch is updatedusethis::use_pkgdown_github_pages()
pkgdown::deploy_to_branch()
usethis::use_mit_license()
for permissive MITusethis::use_gpl_license()
for copyleft GPLGPL (>= 3)
LICENSE
file optionally can contain further restrictions of the licenseVersion
field defines the package version.
or -
x.y-z
, equivalent to x.y.z
x
is major: Increment this for breaking changesy
is minor: Increment this for new featuresz
is patch: Increment this for bug fixes onlyx.y.z.9000
and count up during developmentusethis::use_version()
can help with this.rda
data files are allowedContact
field could be used<doi:...>
❗ A CRAN submission can be punishing, painful, and nerve-racking:
The first release of the rpact package took 5 weeks and 6 submission attempts; painful experiences:
Example message informing about the rejection of the last rpact submission:
Dear maintainer,
package rpact_3.3.2.tar.gz does not pass the incoming checks automatically, please see the following pre-tests:
Windows: 00check.log Status: OK, Debian: 00check.log Status: OKPlease fix all problems and resubmit a fixed version via the webform.
Best regards,
CRAN teams’ auto-check servicer-devel-windows-x86_64 Check: Result: NA, Maintainer: ‘Friedrich Pahlke’
r-devel-windows-x86_64 Check: Overall checktime, Result: NOTE, Overall checktime 12 min > 10 min
r-devel-linux-x86_64-debian-gcc Check: Result: Note_to_CRAN_maintainers Maintainer: ‘Friedrich Pahlke’
R CMD check
runs on different operating systems before submitting to CRANrhub::check_for_cran()
is comfortablevx.y.z
remotes::install_github("org/package", ref = "vx.y.z")
tar.gz
package files are rarely used directlyUse the same repository created from template https://github.com/kkmann/simulatr
--as-cran
in check optionsR CMD check
results?use_pkgdown_github_pages
pkgdown
git
use_github_action("pkgdown")