add_vignette: Create a vignette document

Description Usage Arguments Value See Also Examples

View source: R/add_vignette.R

Description

This function adds a vignette in the folder vignettes/. It also adds dependencies knitr and rmarkdown in the field Suggests of the DESCRIPTION file (if not already present in fields Imports).

Usage

1
2
3
4
5
6
7
add_vignette(
  filename = NULL,
  title = NULL,
  open = TRUE,
  overwrite = FALSE,
  quiet = FALSE
)

Arguments

filename

a character of length 1

The name of the .Rmd file to be created. If NULL (default )the .Rmd file will be named pkg.Rmd where pkg is your package name.

title

a character of length 1

The title of the vignette. If NULL (default) the title will be Introduction to pkg (where pkg is your package name).

open

a logical value

If TRUE (default) the file is opened in the editor.

overwrite

a logical value

If this file is already present and overwrite = TRUE, it will be erased and replaced. Default is FALSE.

quiet

a logical value

If TRUE messages are deleted. Default is FALSE.

Value

None

See Also

Other create files: add_citation(), add_compendium(), add_description(), add_license(), add_makefile(), add_package_doc(), add_readme_rmd(), add_testthat()

Examples

1
2
3
4
5
6
7
8
## Not run: 
## Default vignette ----
add_vignette()

## Custom vignette ----
add_vignette(filename = "get_started", title = "Get started")

## End(Not run)

rcompendium documentation built on March 24, 2021, 5:06 p.m.