| Line 1... |
Line 1... |
| 1 |
% File src/library/tools/man/checkVignettes.Rd
|
1 |
% File src/library/tools/man/checkVignettes.Rd
|
| 2 |
% Part of the R package, https://www.R-project.org
|
2 |
% Part of the R package, https://www.R-project.org
|
| 3 |
% Copyright 1995-2014 R Core Team
|
3 |
% Copyright 1995-2019 R Core Team
|
| 4 |
% Distributed under GPL 2 or later
|
4 |
% Distributed under GPL 2 or later
|
| 5 |
|
5 |
|
| 6 |
\name{checkVignettes}
|
6 |
\name{checkVignettes}
|
| 7 |
\alias{checkVignettes}
|
7 |
\alias{checkVignettes}
|
| 8 |
\alias{print.checkVignettes}
|
8 |
\alias{print.checkVignettes}
|
| 9 |
\title{Check Package Vignettes}
|
9 |
\title{Check Package Vignettes}
|
| 10 |
\description{
|
10 |
\description{
|
| 11 |
Check all \code{\link{Sweave}} files of a package by running
|
11 |
Check all vignettes of a package by running
|
| - |
|
12 |
\code{\link{Sweave}} (or other custom weave function) and/or
|
| 12 |
\code{\link{Sweave}} and/or \code{\link{Stangle}} on them. All
|
13 |
\code{\link{Stangle}} (or other custom tangle function) on them.
|
| 13 |
R source code files found after the tangling step are
|
14 |
All R source code files found after the tangling step are
|
| 14 |
\code{\link{source}}ed to check whether all code can be
|
15 |
\code{\link{source}}ed to check whether all code can be
|
| 15 |
executed without errors.
|
16 |
executed without errors.
|
| 16 |
}
|
17 |
}
|
| 17 |
\usage{
|
18 |
\usage{
|
| 18 |
checkVignettes(package, dir, lib.loc = NULL,
|
19 |
checkVignettes(package, dir, lib.loc = NULL,
|
| 19 |
tangle = TRUE, weave = TRUE, latex = FALSE,
|
20 |
tangle = TRUE, weave = TRUE, latex = FALSE,
|
| 20 |
workdir = c("tmp", "src", "cur"),
|
21 |
workdir = c("tmp", "src", "cur"),
|
| 21 |
keepfiles = FALSE)
|
22 |
keepfiles = FALSE)
|
| 22 |
}
|
23 |
}
|
| 23 |
\arguments{
|
24 |
\arguments{
|
| 24 |
\item{package}{a character string naming an installed package. If
|
25 |
\item{package}{a character string naming an installed package.
|
| 25 |
given, Sweave files are searched in subdirectory \file{doc}.}
|
26 |
If given, vignette source files are looked for in subdirectory
|
| - |
|
27 |
\file{doc}.}
|
| 26 |
\item{dir}{a character string specifying the path to a package's root
|
28 |
\item{dir}{a character string specifying the path to a package's root
|
| - |
|
29 |
source directory.
|
| 27 |
source directory. This subdirectory \file{inst/doc} is searched for
|
30 |
If given, vignette source files are looked for in subdirectory
|
| 28 |
Sweave files.}
|
31 |
\file{vignettes}.}
|
| 29 |
\item{lib.loc}{a character vector of directory names of \R libraries,
|
32 |
\item{lib.loc}{a character vector of directory names of \R libraries,
|
| 30 |
or \code{NULL}. The default value of \code{NULL} corresponds to all
|
33 |
or \code{NULL}. The default value of \code{NULL} corresponds to all
|
| 31 |
libraries currently known. The specified library trees are used to
|
34 |
libraries currently known. The specified library trees are used to
|
| 32 |
search for \code{package}.}
|
35 |
search for \code{package}.}
|
| 33 |
\item{tangle}{Perform a tangle and \code{\link{source}} the extracted code?}
|
36 |
\item{tangle}{Perform a tangle and \code{\link{source}} the extracted code?}
|
| 34 |
\item{weave}{Perform a weave?}
|
37 |
\item{weave}{Perform a weave?}
|
| 35 |
\item{latex}{logical: if \code{weave} and \code{latex}
|
38 |
\item{latex}{logical: if \code{weave} and \code{latex}
|
| 36 |
are \code{TRUE} and there is no \file{Makefile} in the vignettes
|
39 |
are \code{TRUE} and there is no \file{Makefile} in the vignettes
|
| 37 |
directory, run the weaved files through \command{pdflatex}.}
|
40 |
directory, run the intermediate \file{.tex} outputs from weaving
|
| - |
|
41 |
through \code{\link{texi2pdf}}.}
|
| 38 |
\item{workdir}{Directory used as working directory while checking the
|
42 |
\item{workdir}{Directory used as working directory while checking the
|
| 39 |
vignettes. If \code{"tmp"} then a temporary directory is created,
|
43 |
vignettes. If \code{"tmp"} then a temporary directory is created,
|
| 40 |
this is the default. If \code{"src"} then the directory containing
|
44 |
this is the default. If \code{"src"} then the directory containing
|
| 41 |
the vignettes itself is used, if \code{"cur"} then the current
|
45 |
the vignettes itself is used, if \code{"cur"} then the current
|
| 42 |
working directory of \R is used.}
|
46 |
working directory of \R is used.}
|
| 43 |
%% R CMD check makes a copy and uses workdir = "src"
|
47 |
%% R CMD check makes a copy and uses workdir = "src"
|
| 44 |
\item{keepfiles}{Delete files in the temporary directory? This option is
|
48 |
\item{keepfiles}{Delete files in the temporary directory? This option is
|
| 45 |
ignored when \code{workdir != "tmp"}.}
|
49 |
ignored when \code{workdir != "tmp"}.}
|
| 46 |
}
|
50 |
}
|
| 47 |
\details{
|
51 |
\details{
|
| 48 |
A \sQuote{vignette} is a file in the package's \file{inst/doc} directory
|
52 |
This function first uses \code{\link{pkgVignettes}} to find the
|
| 49 |
with extension \file{.Rnw} (preferred), \file{.Snw}, \file{.Rtex} or
|
53 |
package vignettes, and in particular their vignette engines (see
|
| 50 |
\file{.Stex} (and lower-case versions are also accepted).
|
54 |
\code{\link{vignetteEngine}}).
|
| 51 |
|
55 |
|
| 52 |
If \code{tangle} is true, this function runs \code{\link{Stangle}} to
|
56 |
If \code{tangle} is true, it then runs \code{\link{Stangle}} (or
|
| - |
|
57 |
other custom tangle function provided by the engine) to produce (one
|
| 53 |
produce (one or more) \R code files from each vignette, then
|
58 |
or more) \R code files from each vignette, then \code{\link{source}}s
|
| 54 |
\code{source}s each code file in turn.
|
59 |
each code file in turn.
|
| 55 |
|
60 |
|
| 56 |
If \code{weave} is true, the vignettes are run through
|
61 |
If \code{weave} is true, the vignettes are run through
|
| 57 |
\code{\link{Sweave}}, which will produce a \file{.tex} file for each
|
62 |
\code{\link{Sweave}} (or other custom weave function provided by the
|
| 58 |
vignette. If \code{latex} is also true, \code{\link{texi2pdf}} is run
|
63 |
engine). If \code{latex} is also true and there is no \file{Makefile}
|
| - |
|
64 |
in the vignettes directory, \code{\link{texi2pdf}} is run on the
|
| 59 |
on the \file{.tex} files from those vignettes which did not give
|
65 |
intermediate \file{.tex} files from weaving for those vignettes which
|
| 60 |
errors in the previous steps.
|
66 |
did not give errors in the previous steps.
|
| 61 |
}
|
67 |
}
|
| 62 |
\value{
|
68 |
\value{
|
| 63 |
An object of class \code{"checkVignettes"}, which is a list with the
|
69 |
An object of class \code{"checkVignettes"}, which is a list with the
|
| 64 |
error messages found during the tangle, source, weave and latex
|
70 |
error messages found during the tangle, source, weave and latex steps.
|
| 65 |
steps. There is a \code{print} method for displaying the
|
71 |
There is a \code{print} method for displaying the information
|
| 66 |
information contained in such objects.
|
72 |
contained in such objects.
|
| 67 |
}
|
73 |
}
|
| 68 |
|
- |
|
| 69 |
\keyword{utilities}
|
74 |
\keyword{utilities}
|
| 70 |
\keyword{documentation}
|
75 |
\keyword{documentation}
|