View source: R/rk.JS.options.R
rk.JS.options | R Documentation |
Combine several options in one JavaScript variable
rk.JS.options( var, ..., collapse = ", ", option = NULL, funct = NULL, array = TRUE, opt.sep = ", ", .ite = list(...) )
var |
Character string, name of the JavaScript variable to use in the script code. |
... |
A list of objects of class |
collapse |
Character string,
how all options should be concatenated on the R code level
(if |
option |
A character string, naming, e.g., an option of an R function which should be
constructed from several variables. Only used if |
funct |
Character string, name of the R function to be called to combine the options,
e.g. "list" for |
array |
Logical, if |
opt.sep |
Character string, will be printed in the resulting R code before the option name. |
.ite |
Like |
An object of class rk.JS.opt
, use rk.paste.JS
on that.
rk.JS.array
,
and the Introduction to Writing Plugins for RKWard
# create two checkboxes for independent options checkA <- rk.XML.cbox(label="Run Test A", value="A") checkB <- rk.XML.cbox(label="Run it fast", value="true") # combine them into one JavaScript options variable rk.JS.options("optionsTestA", ite(checkA, qp("test=\"", checkA, "\"")), ite(checkB, "fast=TRUE") )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.