Description Usage Arguments Value Examples
Function to get the imputed data. It requires the previous use of the
impute
method.
1 2 | 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).
1 2 3 4 5 6 7 8 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.