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.
library(rlang, include.only = "%|%") library(magrittr, include.only = c("%>%", "%<>%", "%T>%", "%!>%", "%$%"))
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")
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(mime_types_exts, 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.