rnw {pkgmaker}R Documentation

Utilities for Vignettes

Description

rnw provides a unified interface to run vignettes that detects the type of vignette (Sweave or knitr), and which Sweave driver to use (either automatically or from an embedded command \VignetteDriver command).

Usage

rnw(x, file = NULL, ..., raw = FALSE)

isManualVignette()

as.rnw(x, ..., load = TRUE)

rnwCompiler(x, verbose = TRUE)

rnwWrapper(x, verbose = TRUE)

rnwDriver(x)

rnwIncludes(x)

rnwChildren(x)

vignetteMakefile(
  package = NULL,
  skip = NULL,
  print = TRUE,
  template = NULL,
  temp = FALSE,
  checkMode = isCHECK() || vignetteCheckMode(),
  user = NULL,
  tests = TRUE
)

compactVignettes(paths, ...)

Arguments

x

vignette source file specification as a path or a rnw object.

file

output file

...

extra arguments passed to as.rnw that can be used to force certain building parameters.

raw

a logical that indicates if the raw result for the compilation should be returned, instead of the result file path.

load

logical to indicate if all the object's properties should loaded, which is done by parsing the file and look up for specific tags.

verbose

logical that toggles verbosity

package

package name. If NULL, a DESRIPTION file is looked for one directory up: this meant to work when building a vignette directly from a package's 'vignettes' sub-directory.

skip

Vignette files to skip (basename).

print

logical that specifies if the path should be printed or only returned.

template

template Makefile to use. The default is to use the file “vignette.mk” shipped with the package pkgmaker and can be found in its install root directory.

temp

logical that indicates if the generated makefile should using a temporary filename (TRUE), or simply named “vignette.mk”

checkMode

logical that indicates if the vignettes should be generated as in a CRAN check (TRUE) or in development mode, in which case pdflatex, bibtex, and, optionally, qpdf are required.

user

character vector containing usernames that enforce checkMode=TRUE, if the function is called from within their session.

tests

logical that enables the compilation of a vignette that gathers all unit test results. Note that this means that all unit tests are run before generating the vignette. However, unit tests are not (re)-run at this stage when the vignettes are built when checking the package with R CMD check.

paths

A character vector of paths to PDF files, or a length-one character vector naming a directory, when all ‘.pdf’ files in that directory will be used.

Value

rnw returns the result of compiling the vignette with runVignette.

Functions


[Package pkgmaker version 0.32.10 Index]