tf | R Documentation |
This function is a basically shortcut for ite
with some assumptions.
It's thought to be used when a checkbox should turn an option of an R function to a specified value,
by default TRUE
or FALSE
(hence the name, abbreviated "true or false").
The same result can be obtained with ite
,
but for most common cases tf
is much quicker.
tf( cbox, true = TRUE, not = FALSE, ifelse = FALSE, false = FALSE, opt = NULL, prefix = ",\n", level = 3, indent.by = rk.get.indent() )
cbox |
An object of class |
true |
Logical or character, the value the option should get. E.g.,
if |
not |
Logical, inverses the checked status of the checkbox. In other words,
set this to |
ifelse |
Logical, whether the options should be set anyway. By default,
the option will only
be set in one condition. If |
false |
Logical or character, the value the option should,
only used get if |
opt |
A character string, naming the R option to be set. If |
prefix |
A character string, what should be pasted before the actual option string. Default is a comma and a newline. |
level |
Integer, which indentation level to use, minimum is 1. |
indent.by |
A character string defining the indentation string to use. This refers to the genrated R code, not the JavaScript code. Indentation is added after the prefix and before the option string. |
An object of class rk.JS.ite
.
ite
,
echo
,
id
,
and the Introduction to Writing Plugins for RKWard
# an example checkbox XML node cbox1 <- rk.XML.cbox(label="foo", value="foo1", id.name="foo_option") tf(cbox1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.