dup.nodes.from.data.frame: Creates an igraph object from a data frame with self-loops
Description
This is an implementation of the method published in the paper "Intra-family links in the analysis of marital networks" mm24:intra_family_linksdupNodes, which proposed a duplication of nodes that includes self-loops to get a reflect better (and include all information about) the status of all nodes in the network.
An igraph object with all nodes with self-loops duplicated. These newly created nodes will have the same name as the original, with a "'" added.
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 duplicates nodes with self-loops, and links the duplicated nodes with the original with a weight that is equal to the number of self-loops.
This can be applied to matrimonial networks where there are marriages among members of the same family, or any other type of network with self-loops, and allows to apply centrality (and other) measures, obtaining a meaningful and more accurate result.
You can them compute "corrected" betweenness on the resulting object using the DNSL.betweenness function.