From fece63636f8545975c47125ffd00454efeb6193f Mon Sep 17 00:00:00 2001 From: Lambda Moses Date: Fri, 15 Nov 2024 21:47:42 -0500 Subject: [PATCH] Make Visium HD graph --- R/graph_wrappers.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/graph_wrappers.R b/R/graph_wrappers.R index b9f6d5e..08f8257 100644 --- a/R/graph_wrappers.R +++ b/R/graph_wrappers.R @@ -721,7 +721,7 @@ findVisiumHDGraph <- function(x, style = "W", queen = FALSE, } cols <- paste0("index_", sides) gm <- as.matrix(df[,..cols]) - gm <- gm + 1L # Convert to 1 based indexing for spdep + gm <- apply(gm, 1, sort) # This is the slowest part colnames(gm) <- NULL g <- apply(gm, 1, function(x) x[!is.na(x)]) class(g) <- "nb"