# plain matrices are returned with the diagonal set to NA
m <- matrix(rbinom(25, 1, 0.4), 5, 5,
dimnames = list(letters[1:5], letters[1:5]))
as_lame_y(m)
if (requireNamespace("igraph", quietly = TRUE)) {
g <- igraph::sample_gnp(8, 0.3)
Y <- as_lame_y(g)
dim(Y)
}
Run the code above in your browser using DataLab