is_weighted | R Documentation |
Is the graph weighted?
is_weighted(graph)
graph |
The graph. |
G <- graph(
data.frame(
stringsAsFactors = FALSE,
id = c("a", "b", "c", "d")
),
data.frame(
stringsAsFactors = FALSE,
from = c("a", "a", "b", "b", "c"),
to = c("b", "d", "d", "c", "a"),
weight = c( 1 , 2 , 1 , 3 , 2 )
)
)
is_weighted(G)
G2 <- graph(
data.frame(
stringsAsFactors = FALSE,
id = c("a", "b", "c", "d")
),
data.frame(
stringsAsFactors = FALSE,
from = c("a", "a", "b", "b", "c"),
to = c("b", "d", "d", "c", "a")
)
)
is_weighted(G2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.