Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

imputeByModule

Impute missing data separately in each module


Description

Use impute.knn to ipmpute missing data, separately in each module.

Usage

imputeByModule(
  data, 
  labels, 
  excludeUnassigned = FALSE, 
  unassignedLabel = if (is.numeric(labels)) 0 else "grey", 
  scale = TRUE, 
  ...)

Arguments

data

Data to be imputed, with variables (genes) in columns and observations (samples) in rows.

labels

Module labels. A vector with one entry for each column in data.

excludeUnassigned

Logical: should unassigned variables (genes) be excluded from the imputation?

unassignedLabel

The value in labels that represents unassigned variables.

scale

Logical: should data be scaled to mean 0 and variance 1 before imputation?

...

Other arguments to impute.knn.

Value

The input data with missing values imputed.

Note

This function is potentially faster but could give different imputed values than applying impute.knn directly to (scaled) data.

Author(s)

Peter Langfelder

See Also

impute.knn that does the actual imputation.


WGCNA

Weighted Correlation Network Analysis

v1.70-3
GPL (>= 2)
Authors
Peter Langfelder <Peter.Langfelder@gmail.com> and Steve Horvath <SHorvath@mednet.ucla.edu> with contributions by Chaochao Cai, Jun Dong, Jeremy Miller, Lin Song, Andy Yip, and Bin Zhang
Initial release
2021-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.