diff --git a/R/community_graph.R b/R/community_graph.R index ad52ea9..af2ae61 100644 --- a/R/community_graph.R +++ b/R/community_graph.R @@ -25,6 +25,7 @@ cov2prec <- function(Cov, tol=1e-4) { warning("Warning: Precision matrix not invertible, trying generalized inverse instead") ginv(Cov) }) Precision[which(Precision == 0)] <- tol + Precision }