Skip to content

Commit

Permalink
Update mfairInitialization.R
Browse files Browse the repository at this point in the history
  • Loading branch information
statwangz committed Sep 15, 2023
1 parent 685bece commit 2eebb76
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/mfairInitialization.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' @importFrom methods new
#'
#' @param Y A matrix. The main data matrix of N samples and M features.
#' @param Y A matrix or Matrix::dgCMatrix. The main data matrix of N samples and M features.
#' @param X A data.frame. The auxiliary information data frame of N samples and C covariates.
#' @param Y_center Logical. Determines whether centering is performed.
#' @param K_max An integer. The maximum rank allowed in the model.
Expand All @@ -11,6 +11,10 @@
#' @return Returns MFAIR object, with main data matrix and auxiliary information.
#' @export
createMFAIR <- function(Y, X, Y_center = TRUE, K_max = 1L, project = "MFAIR") {
if(is.data.frame(X)){
stop("X should be a data.frame!")
} # End

# Data dimension
N <- nrow(Y)
M <- ncol(Y)
Expand Down

0 comments on commit 2eebb76

Please sign in to comment.