multiline_labels {sgraph} | R Documentation |
Format multiline labels
Description
The sgraph R package extends the sigma.js library to enable multiline labels. The Javascript functions will start new lines on line breaks ('\n') and this function enables to easily format the details of nodes by showing the value of the relationship (edge weights) it has with other nodes. See the Shiny examples for use cases.
Usage
multiline_labels(
df_nodes,
display_val_str = "\nP-value: ",
replace_codes = TRUE,
label_str = "Label: ",
group_str = "Group: "
)
Arguments
df_nodes |
Nodes data frame of a sgraph object |
display_val_str |
String that will be prepended to each edge weight |
replace_codes |
Should the label of the node replace the id ? |
label_str |
String that will pe prepended to the node label |
group_str |
String that will pe prepended to the node group |
Value
sgraph object with modified node hidden atribute
[Package sgraph version 1.0.0 Index]