From 29d49d7ac11bd84fe0f9b6364a1aeb91ee8cb8c6 Mon Sep 17 00:00:00 2001 From: Gao Wang Date: Mon, 18 Mar 2024 19:32:40 -0400 Subject: [PATCH] Fix null model object names --- R/mash_regression.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/mash_regression.R b/R/mash_regression.R index 6c85fb1..fdd6508 100644 --- a/R/mash_regression.R +++ b/R/mash_regression.R @@ -297,7 +297,7 @@ MashInitializer <- R6Class("MashInitializer", if (!all(xUlist[[1]] == 0)) { xUlist <- c( list(null_model = matrix(0, nrow(xUlist[[1]]), ncol(xUlist[[1]]), - dimnames = list(rownames = rownames(xUlist[[1]]), colnames = colnames(xUlist[[1]])) + dimnames = list(rownames(xUlist[[1]]),colnames(xUlist[[1]])) )), xUlist ) @@ -373,7 +373,7 @@ MashInitializer <- R6Class("MashInitializer", } prior_weights <- prior_weights / sum(prior_weights) private$xU <- list( - pi = c(null_model = null_weight, prior_weights * (1 - null_weight)), + pi = setNames(c(null_weight, prior_weights * (1 - null_weight)), names(xUlist)), xUlist = xUlist )