setup.APS.knitr(outdir, include.css = system.file("AnalysisPageServer.css", package = "AnalysisPageServer"), include.toc = TRUE, quiet = TRUE)
knit_asis
objects.
```{r echo = FALSE}
AnalysisPageServer::setup.knitr()
```
Calling this function has the following effects:
buildVignettes
call. If so then it sets
clean = FALSE
for that call. The reason for this is that
for the document to work it will need a bunch of auxiliary files
like .css and .js, and if clean = TRUE
then these files
won't be left and your data sets will not show at all. During
R CMD build buildVignettes
is explicitly called with
clean = TRUE
so this is the only way I could figure out
how to turn it off. If it can't find buildVignettes
in the
call stack then nothing special happens. This would be the case
if you are just calling knit2html
yourself.
knit2html
call, then grabs the name of the output
file from there and uses
its directory as outdir
. If it can't find a knit2html
call then it throws an error.The output directory is saved with a call to the private function
set.APS.outdir
. This is then read back by embed.APS.dataset
so that the data sets get written to the write place. You could add
a reset.APS.outdir()
call in a chunk at the bottom of your knitr document.
include.css
are copied to the output directory and
included as CSS. The default is a default stylesheet that will make
your reports look like the vignettes.
Finally it returns the html headers as a "knit_asis" object
to be included in your document. See custom.html.headers
.
message("See vignette embedding.html")
Run the code above in your browser using DataLab