idq | R Documentation |
This is actually a convenience wrapper for id
and returns the XML ID of XiMpLe nodes in quoted format,
optionally with an attached modifier.
idq(obj, modifiers = NULL, check.modifiers = TRUE, js = TRUE, quote = "\"")
obj |
An object of class |
modifiers |
A character vector with modifiers you'd like to apply to the XML node property. |
check.modifiers |
Logical,
if |
js |
Logical,
if |
quote |
Character string to be used for quoting. |
You can use this function to write almost literal JavaScript code, but still be able to extract IDs from generated R objects.
A character string.
You should always nest this function inside an id
call (or a similar wrapper)
to prevent rk.paste.JS
from appending newline characters – see the example section.
myCheckbox <- rk.XML.cbox("Check for action") rk.paste.JS(id("var x = getBoolean(", idq(myCheckbox, modifiers="state"), ");"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.