prep_unlabeled_graph: Prepared Unlabeled Graph to work with Degree-Betweenness...

View source: R/prep_unlabeled_graph.R

prep_unlabeled_graphR Documentation

Prepared Unlabeled Graph to work with Degree-Betweenness Algorithm

Description

[Deprecated] Presently, cluster_degree_betweenness() function only works with labeled graphs. prep_unlabeled_graph() is a utility function that gives an unlabeled graph labels which are string values of their vertices.

Usage

prep_unlabeled_graph(graph)

Arguments

graph

an unlabeled graph.

Value

An "igraph" object with named vertices.

See Also

cluster_degree_betweenness() which this function aids.

Examples

library(igraph)
library(igraphdata)
library(ig.degree.betweenness)
data("UKfaculty")
# Making graph undirected so it looks nicer when its plotted
uk_faculty <- prep_unlabeled_graph(UKfaculty) |>
  as.undirected()

ndb <- cluster_degree_betweenness(uk_faculty)

plot(
ndb,
uk_faculty,
main= "Node Degree Clustering"
)

ndb

ig.degree.betweenness documentation built on June 18, 2026, 1:06 a.m.