View source: R/get_degree_histogram.R
get_degree_histogram | R Documentation |
Get histogram data for a graph's degree frequency. The bin width is set to 1 and zero-value degrees are omitted from the output.
get_degree_histogram(graph, mode = "total")
graph |
A graph object of class |
mode |
using |
A data frame with degree counts.
# Create a random graph using the
# `add_gnm_graph()` function
graph <-
create_graph(
directed = FALSE) %>%
add_gnm_graph(
n = 10,
m = 15,
set_seed = 23)
# Get degree histogram data for
# the graph (reporting total degree)
graph %>%
get_degree_histogram(
mode = "total")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.