Learn R Programming

dupNodes (version 0.3.0)

DNSL.betweenness: Computed betweenness via duplication of nodes with self-loops (Duplicated Nodes with Self Loops)

Description

Computes the betweenness of nodes in a graph that includes self-loops directly.

Usage

DNSL.betweenness(df,first.node = "V1",second.node = "V2")

Value

A list with betweenness values indexed by node name

Arguments

df

A data frame that should include at least two columns with the names of the nodes

first.node

The column that indicates the node that's linked

second.node

The column that indicates the other node that's linked

Details

This method computes betweenness centrality of a social network described by a data frame. Use it when you want to just apply the DNSLbetweenness method mm24:intra_family_linksdupNodes to a data set, without using the intermediate graph obtained by duplicating nodes.

References

Examples

Run this code
library(igraph)
V1 <- c("A", "A","B","C","D","E")
V2 <- c("A", "B","C","D","E","A")
print(DNSL.betweenness(data.frame(V1,V2)))

Run the code above in your browser using DataLab