This file is not included in the source package because of the .nopurl
suffix in its
filename.
The chunks below have to be manually executed in order to regenerate the package data.
Although the datasets below are saved as "internal data" in R/sysdata.rda
, they can still be exported and
documented (by documenting the dataset's quoted name in the main .Rmd
source file – which only works when the dataset is also @export
ed), something not
explicitly mentioned in the book R
Packages. To do so, you first need to manually add the export()
directive in the NAMESPACE file since
roxygen2 won't add it automatically.
pkg_mgr_software
Define what R-related software is available via Homebrew, Chocolatey and Scoop.
pkg_mgr_software <- list( "Git" = list(brew = list(url = "https://formulae.brew.sh/formula/git", cmd = "brew install git"), scoop = list(url = "https://scoop.sh/#/apps?q=git", cmd = "scoop install git"), choco = list(url = "https://community.chocolatey.org/packages/git", cmd = "choco install git")), "Quarto" = list(brew = list(url = "https://formulae.brew.sh/cask/quarto", cmd = "brew install --cask quarto")), "R" = list(brew = list(url = "https://formulae.brew.sh/formula/r", cmd = "brew install r"), scoop = list(url = "https://scoop.sh/#/apps?q=R+statistical+computing", cmd = "scoop install r"), choco = list(url = "https://community.chocolatey.org/packages/R", cmd = "choco install r")), "RStudio" = list(brew = list(url = "https://formulae.brew.sh/cask/rstudio", cmd = "brew install --cask rstudio"), scoop = list(url = "https://scoop.sh/#/apps?q=rstudio", cmd = "scoop bucket add extras; scoop install rstudio"), choco = list(url = "https://community.chocolatey.org/packages/R.Studio", cmd = "choco install r.studio")) )
qmd_layout_classes
qmd_layout_classes <- yay::gh_text_file(path = "src/resources/schema/definitions.yml", owner = "quarto-dev", name = "quarto-cli") |> yaml::read_yaml(text = _) |> purrr::keep(\(x) x$id == "page-column") |> purrr::chuck(1L, "enum")
Save all the small data objects as a single internal file R/sysdata.rda
. Note that when documenting them, they must be explicitly @export
ed to be available
to package users.
usethis::use_data(pkg_mgr_software, qmd_layout_classes, internal = TRUE, overwrite = TRUE, compress = "xz", version = 3L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.