From 33c43891a7419b6f657fb6a38ec68de08a985e91 Mon Sep 17 00:00:00 2001 From: YingxinLin Date: Sat, 13 Apr 2024 01:52:34 +1000 Subject: [PATCH] fix ruvg --- R/scRUVg.R | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/R/scRUVg.R b/R/scRUVg.R index b534a46..5e720b2 100644 --- a/R/scRUVg.R +++ b/R/scRUVg.R @@ -76,11 +76,10 @@ scRUVg <- function(Y, ctl, k, Z = 1, eta = NULL, include.intercept = TRUE, } W = alpha = NULL - W = fullW[, seq_len(k), drop = FALSE] alpha = solve(t(W) %*% W) %*% t(W) %*% Y0 - - newY = Y - W %*% alpha + Y <- DelayedArray::DelayedArray(Y) + newY = Y - DelayedArray::DelayedArray(W %*% alpha) return(list(newY = newY, W = W, alpha = alpha)) }