# NOT RUN {
h <- hypergraph_from_edgelist(list(1:4,2:5))
hypergraph_as_adjacency_matrix(h)
# returns:
# 5 x 5 Matrix of class "dgeMatrix"
# 1 2 3 4 5
# 1 0 1 1 1 0
# 2 1 0 2 2 1
# 3 1 2 0 2 1
# 4 1 2 2 0 1
# 5 0 1 1 1 0
# }
Run the code above in your browser using DataLab