NOTES

Define data

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")

Write data

Save all the small data objects as a single internal file R/sysdata.rda. Note that when documenting them, they must be explicitly @exported to be available to package users.

usethis::use_data(pkg_mgr_software,
                  qmd_layout_classes,
                  internal = TRUE,
                  overwrite = TRUE,
                  compress = "xz",
                  version = 3L)


salim-b/salim documentation built on May 3, 2024, 9:38 a.m.