set_values | R Documentation |
SVG files and the imported representation of class 'XMLsvg' are
hierarchically organized in node sets and nodes. Each node is a graphical
object such as a path, rectangle, or text. This function changes _values_ of
nodes, most notably text fields. For _attributes_ which describe the properties
of a value, see set_attributes()
. Note that even when the output of
set_values()
is not assigned to a new object, the input XMLsvg
object
is still changed. This is because, unlike usual R work flows, attributes of
XML objects are changed on the fly (similar to python).
set_values(xml, node = NULL, node_attr = "label", value = NULL)
xml |
(XMLsvg) XMLsvg object obtained from |
node |
(character) node(s) to be modified. Node names are searched using the 'node_attr' field |
node_attr |
(character) name of the attribute by which target nodes are filtered (default: "label") |
value |
(character) The (new) value assigned to |
Returns an object of class 'XMLsvg'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.