context("Bug 1019624 from Launchpad") test_that("weighted graph_from_adjacency_matrix works on integer matrices", { library(igraph) data <- matrix(c(0,0,0,2, 0,0,0,0, 0,0,0,2, 0,1,0,0), 4) g <- graph_from_adjacency_matrix(data, weighted=TRUE) expect_that(as.matrix(g[]), is_equivalent_to(data)) })
Generated by dwww version 1.15 on Sat May 18 14:57:01 CEST 2024.