hypergraph | R Documentation |
Hypergraph consist of a set of objects and a collection of subsets of objects, in which each object belongs to at least one subset, and no subset is empy (Berge, 1989)
hypergraph(A, dual = TRUE, both = TRUE)
A |
An incidence matrix. |
dual |
Whether to return the dual hypergraph (which rever the role of the pointes and the edges) |
both |
Whether to return the hypergraph and the dual hypergraph |
This function returns an adjacent list of the subsets of entities in the hypergraph.
Alejandro Espinosa-Rada
Berge, C. (1973). Graphs and hypergraphs.Amsterdam: North-Holland.
Berge, C. (1989). Hypergraphs: Combinatorics of finite sets. Amsterdam: North-Holland.
Wasserman, S. and Faust, K. (1994). Social network analysis: Methods and applications. Cambridge University Press.
A <- matrix(c(
1, 0, 1,
0, 1, 0,
0, 1, 1,
0, 0, 1,
1, 1, 1,
1, 1, 0
), byrow = TRUE, ncol = 3)
colnames(A) <- letters[1:ncol(A)]
rownames(A) <- letters[(ncol(A) + 1):(nrow(A) + ncol(A))]
hypergraph(A, both = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.