Skip to content
Prev 46525 / 63424 Next

Error when using buildVignettes()

Ok.  ...I've now read your original thread more carefully, and I'd say
that tools::buildVignettes() is intended for building vignettes within
packages, not for compiling vignette files in general.  This is most
likely why it complains - it simply looks for files that it expect to
see in a package source tree.  FYI, lots of changes were made to these
tools in R 3.0.0, which may explain why you didn't see them before
(not saying it was correct usage before either).

I'd say, use Sweave/Stangle "manually" and then pass it on to tools::texi2pdf().

<sales pitch>
1. For *.Rnw -> *.tex -> *.pdf, you can use R.rsp::compileRnw() that
does all this in one go with more sanity checks.

2. Instead of using all those sub("@TITLE@",  title, ...) coding to
generate the report Rnw from a main Rnw template, add a layer of RSP
markup and run it through the RSP compiler.  For instance, with a
template.Rnw.rsp containing:

 This is the quality assessment report for the dataset '<%=dataset%>'.
The dataset consists of
 <%=numtrees%> Affymetrix <%=chiptype%> arrays of type '<%=chipname%>'.

you can compile it all in one go into a final PDF by pdf <-
R.rsp::rfile("template.Rnw.rsp").  RSP supports <%@include
file="..."%> statements and more if you wish to bring multiple Rnw
templates into a final one.  See help("R.rsp") for vignettes etc.
</sales pitch>
On Wed, Aug 28, 2013 at 3:10 PM, cstrato <cstrato at aon.at> wrote: