| subsetViews {MOFA} | R Documentation |
Method to subset (or sort) views.
This function can remove entire views from the model.
For example, you might want to generate the plotVarianceExplained plot
excluding a particular view.
This functionality is only for exploratory purposes.
If some view(s) are not of interest we strongly recommend removing them before training the model.
subsetViews(object, views)
object |
a |
views |
character vector with the view names, numeric vector with the view indices or logical vector with the view to be kept as TRUE. |
MOFAmodel object with a subset of views
# Using an existing trained model on the CLL data
filepath <- system.file("extdata", "CLL_model.hdf5", package = "MOFAdata")
MOFA_CLL <- loadModel(filepath)
# Subset views via character vector
MOFA_CLL_small <- subsetViews(MOFA_CLL, views=c("Drugs","Methylation"))
MOFA_CLL_small
# Subset views via numeric vector
MOFA_CLL_small <- subsetViews(MOFA_CLL, views=2:3)
MOFA_CLL_small