Nothing
# This code contains knitr on a newline and should not be read with `\nknitr`
create_vignette_head <- function(pkg, vignette_name, yaml_options = NULL) {
pkgname <- basename(pkg)
# Get all yaml options except Title, output, editor_options
yaml_options <- yaml_options[
!names(yaml_options) %in% c("output", "title", "editor_options")]
enc2utf8(
glue(
'---
title: ".{vignette_name}."
output: rmarkdown::html_vignette',
ifelse(length(yaml_options) != 0,
glue::glue_collapse(
c("",
glue("{names(yaml_options)}: \"{yaml_options}\""), ""),
sep = "\n"),
"\n"),
'vignette: >
%\\VignetteIndexEntry{.{vignette_name}.}
%\\VignetteEngine{knitr::rmarkdown}
%\\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
```{r setup}
library(.{pkgname}.)
```
',
.open = ".{", .close = "}."
)
)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.