set_values: Change values of an imported SVG file

View source: R/set_values.R

set_valuesR Documentation

Change values of an imported SVG file

Description

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).

Usage

set_values(xml, node = NULL, node_attr = "label", value = NULL)

Arguments

xml

(XMLsvg) XMLsvg object obtained from read_svg()

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

Value

Returns an object of class 'XMLsvg'


m-jahn/fluctuator documentation built on Nov. 4, 2024, 9:35 p.m.