graph_attr_from_df | R Documentation |
Add graph attributes to a graph from a data frame where each column represents an attribute. Note that only the first row of the data frame is used.
graph_attr_from_df(g, df)
g |
the graph (an igraph object) to which the graph attributes should be added |
df |
data frame, or an object that can be converted to a data frame, where the first row contains a graph attribute in each column |
Graph g
with the graph attributes in df
added.
g=igraph::graph_from_literal(1-2,2-3:4,3-4:5:6,5-1)
df=data.frame(name="Test Graph",descr="A graph")
graph_attr_from_df(g,df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.