# This function is typically used as an internal function.
# It is also used when performing cross-validation,
# refer to multi-omics vignette for more detail.
# X <- list(X1,X2)
# result <- getCanWeightsMulti(X, Trait = as.matrix(Y), Lambda = c(0.5,0.5), NoTrait = FALSE)
# result <- getCanWeightsMulti(X, Trait = NULL, Lambda = c(0.5,0.5), NoTrait = TRUE)
# cccoef <- c(1,10,10)
# result <- getCanWeightsMulti(X, Trait = as.matrix(Y), CCcoef = cccoef,
# Lambda = c(0.5,0.5), NoTrait = FALSE)
Run the code above in your browser using DataLab