Description Usage Arguments Value Examples
add (sub)nodes to a node generated by vt_create_node
or returned
from vt_add_nodes
1 2 |
node |
a node object |
refnode |
name of the reference node |
node_names |
new node names |
colors |
optionally a vector of colors matching the length of |
weights |
optionally a vector of weights matching the length of |
codes |
optionally a vector of short labels matching the length of |
a Node object
1 2 3 4 5 6 7 | n <- vt_create_node("Total")
n <- vt_add_nodes(n, refnode="Total",node_names=c("Asia","Europe"), colors=c("red","blue"))
n <- vt_add_nodes(n, refnode="Asia",node_names=c("China","Thailand"),
weights=c(0.5, 0.8), codes=c("CN","TH"))
n <- vt_add_nodes(n, refnode="Europe",node_names=c("Netherlands","Austria"),
weights=c(0.9, 1.1), codes=c("NL","AT"))
print(n, "weight", "code", "color")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.