Skip to content

Commit

Permalink
fix ruvg
Browse files Browse the repository at this point in the history
  • Loading branch information
YingxinLin committed Apr 12, 2024
1 parent 3f23952 commit 33c4389
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/scRUVg.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit 33c4389

Please sign in to comment.