impute_matrix: Impute missing values in a matrix

Description Usage Arguments Details Value Examples

View source: R/OmicsPLS.R

Description

Impute missing values in a matrix

Usage

1

Arguments

X

A matrix with missing values in some entries.

...

Further arguments for softimpute.

Details

This function is based on the softImpute function in its eponymous package.

Value

An imputed version of matrix X

Examples

1
2
3
4
5
X <- matrix(rnorm(20*100),20)
Xmis <- X
Xmis[sample(length(Xmis),length(Xmis)/10)] <- NA
anyNA(X)
anyNA(impute_matrix(Xmis))

OmicsPLS documentation built on May 19, 2021, 5:08 p.m.