NOTES

Setup

library(rlang,
        include.only = "%|%")
library(magrittr,
        include.only = c("%>%", "%<>%", "%T>%", "%!>%", "%$%"))

Define data

mime_types_exts

mime_types_exts <- c(mime::mimemap,
                     setdiff(mime:::mimeextra, mime::mimemap),
                     # MIME types not yet included in pkg mime
                     webp = "image/webp")

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(mime_types_exts,
                  internal = TRUE,
                  overwrite = TRUE,
                  compress = "xz",
                  version = 3L)


salim-b/pal documentation built on Feb. 28, 2025, 6:51 p.m.