## to generate an adjacency matrix
A = matrix(c(0,1,1,1,0,0,1,0,0), byrow = TRUE, ncol = 3)
## have a look at A
A
## unnormalised Laplacian matrix
laplacian(A)
## normalised Laplacian matrix
laplacian(A, normalised = TRUE)
Run the code above in your browser using DataLab