check_vignettes: identify the presence and source of package vignettes.

Description Usage Arguments Details Value See Also Examples

Description

identify how a package's vignettes are built, if it has vignettes.

Usage

1
check_vignettes(package_directory)

Arguments

package_directory

the directory the package source code lives in, returned from get_package_source

Details

There are two things to look for in terms of vignettes: the format, either LaTeX or R markdown, and the vignette builder, typically Sweave or knitr. All .Rmd files are knitr, but .Rnw can be compiled by either.

check_vignettes looks for a vignettes folder to see whether .Rnw (LaTeX) files or .Rmd (markdown) files are found. It also checks for a VignetteBuilder option in the DESCRIPTION.

Value

A list with two components:

Format

"None" if no vignettes are found, "LaTeX" if LaTeX .Rnw files are found, "Markdown" if .Rmd files are found.

Builder

The package used to compile the vignettes, typically Sweave or knitr.

See Also

check_roxygen to identify if a package's documentation is formatted using roxygen2, check_changelog to see if there is something that looks like a changelog, and the package index for more tests and checks.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
#Identify how urltools vignettes are built, if it has any.
#It does, and if you run this code, you'll see the answer is
#"Knitr".
file_location <- get_package_source("urltools")
check_vignettes(file_location)

#Fortunes uses sweave
file_location <- get_package_source("fortunes")
check_vignettes(file_location)

#A3 has no vignettes
file_location <- get_package_source("A3")
check_vignettes(file_location)

## End(Not run)

Ironholds/practice documentation built on May 7, 2019, 6:41 a.m.