The linkcomm package is an R package developed with the main aim of letting you discover and study communities that exist within your network. These communities are discovered by applying an algorithm derived from the paper Link communities reveal multiscale complexity in networks by Ahn Y.Y., Bagrow J.P., and Lehmann.
In order to use linkcomm
functionalities, we first need to install and load the linkcomm
package:
install.packages("linkcomm") library(linkcomm)
As a sample dataset, we will use the lesmiserables
hedge list, provided in the linkcomm
package. This dataset basically shows relations hips between characters in Victor Hugo's novel Les Misérables.
You can get a sense of the dataset by running str()
on it:
> str(lesmiserables) 'data.frame': 254 obs. of 2 variables: $ V1: Factor w/ 73 levels "Anzelma","Babet",..: 61 49 55 55 21 33 12 23 20 62 ... $ V2: Factor w/ 49 levels "Babet","Bahorel",..: 42 42 42 36 42...