embed.APS.dataset {AnalysisPageServer} | R Documentation |
Embed an APS dataset
embed.APS.dataset(plot, df, title, show.sidebar = TRUE, show.table = TRUE, num.table.rows = 10, extra.html.classes = character(), extra.div.attr = character(), svg.args = list(), eval.args = list(envir = parent.frame()), outdir = get.APS.outdir(), randomize.filename = TRUE, ...)
plot |
If present, then either an expression, a function, or a path to SVG file (not yet annotated).
If an then the expression will be evaluated after opening
a plotting device. The expression
will be evaluated in the calling frame, so your local variables will be
accessible, but this can be changed by modifying |
df |
data.frame of data. If omitted, then the return value
of evaluating the plotting expression or function is used (if |
title |
Caption for plot |
show.sidebar |
Boolean, default TRUE. Set to FALSE to not show the
sidebar (filtering, tagging). (This is passed through directly to
|
show.table |
Boolean, default TRUE. Set to FALSE to not show the data
table (still available on download.
(This is passed through directly to
|
num.table.rows |
Number of table rows to show. Default: 10
(This is passed through directly to
|
extra.html.classes |
Charvec of extra HTML classes to include in the
div. (This is embedded in a list then passed through directly to
|
extra.div.attr |
Names charvec of extra attributes to include in the div.
(This is embedded in a list then passed through directly to
|
svg.args |
Arguments (other than filename) to pass to the |
eval.args |
Arguments to pass to |
outdir |
Output directory. Default: |
randomize.filename |
Passed through to |
... |
Passed through to |
This function is meant to be called in a knitr document
that is being knit with knit2html
. It
makes a few assumptions that are valid in that context.
It makes a call to static.analysis.page
for you
to annotate and write the SVG and JSON files, then emits
the <div>
element to STDOUT. outdir
defaults to ".".
It only does one plot/dataset at a time.
Returns the div, invisibly.
Brad Friedman
message("See vignette embedding.html")