get_covariates | R Documentation |
Function to extract the covariates from a MOFA
object using MEFISTO.
get_covariates(
object,
covariates = "all",
as.data.frame = FALSE,
warped = FALSE
)
object |
a |
covariates |
character vector with the covariate name(s), or numeric vector with the covariate index(es). |
as.data.frame |
logical indicating whether to output the result as a long data frame, default is |
warped |
logical indicating whether to extract the aligned covariates |
a matrix with dimensions (samples,covariates). If as.data.frame
is TRUE
, a long-formatted data frame with columns (sample,factor,value)
# Using an existing trained model
file <- system.file("extdata", "MEFISTO_model.hdf5", package = "MOFA2")
model <- load_model(file)
covariates <- get_covariates(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.