subsetViews: Subset views

Description Usage Arguments Value Examples

View source: R/subset.R

Description

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.

Usage

1
subsetViews(object, views)

Arguments

object

a MOFAmodel object.

views

character vector with the view names, numeric vector with the view indices or logical vector with the view to be kept as TRUE.

Value

MOFAmodel object with a subset of views

Examples

1
2
3
4
5
6
7
8
9
# 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

MOFA documentation built on Feb. 11, 2021, 2:01 a.m.