From 4a5b74e9ce80985ffe3e062f3041172dc99b7cb6 Mon Sep 17 00:00:00 2001 From: WANG Zhiwei <48282751+statwangz@users.noreply.github.com> Date: Tue, 19 Sep 2023 14:55:31 +0800 Subject: [PATCH] Update mfairInitialization.R --- R/mfairInitialization.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/mfairInitialization.R b/R/mfairInitialization.R index bb4855c..d33d79a 100644 --- a/R/mfairInitialization.R +++ b/R/mfairInitialization.R @@ -30,7 +30,7 @@ createMFAIR <- function(Y, X, } # End # Check whether to transfer Y to the sparse matrix mode - if (class(Y) == "dgCMatrix") { # Y is already in sparse mode + if ("dgCMatrix" %in% class(Y)) { # Y is already in sparse mode Y_sparse <- TRUE message("The main data matrix Y has been stored in the sparse mode!") } else if (Y_sparse == TRUE) { # Y is not in sparse mode, but we want it to be