getImputedData {MOFA} | R Documentation |
Function to get the imputed data. It requires the previous use of the
impute
method.
getImputedData(object, views = "all", features = "all", as.data.frame = FALSE)
object |
a trained |
views |
character vector with the view name(s), or numeric vector with the view index(es). Default is "all". |
features |
list of character vectors with the feature names or list of numeric vectors with the feature indices. Default is "all" |
as.data.frame |
logical indicating whether to return a long-formatted data frame
instead of a list of matrices.
Default is |
By default returns a list where each element is a matrix with dimensionality (D,N),
where D is the number of features in this view and N is the number of samples.
Alternatively, if as.data.frame
is TRUE
,
returns a long-formatted data frame with columns (view,feature,sample,value).
# load a trained MOFAmodel object filepath <- system.file("extdata", "CLL_model.hdf5", package = "MOFAdata") MOFAobject <- loadModel(filepath) # impute missing values MOFAobject <- impute(MOFAobject) # get imputations for a single view imputedDrugs <- getImputedData(MOFAobject,view="Drugs") head(imputedDrugs)