pre_process_data: Pre-processing of the data

Description Usage Arguments Value Examples

Description

The function takes in a g x N matrix, where g is the number of features and N is the number of samples, and removes any 0 variance entries followed by mean centering. If scaling option is true it will scale all rows to have unit standard deviation.

Usage

1
pre_process_data(input_matrix, scale.pheno)

Arguments

input_matrix

Input matrix with a dimension of g X N input_matrix

scale_pheno

If TRUE features are scaled to have unit standard deviation.

Value

Pre-processed data matrix

Examples

1
2
3
4
5
6
7
raw.data <- rbind(rnorm(100,2,3),rnorm(100,10,2))
centered <- pre_process_data(raw.data, scale_pheno = FALSE)
apply(centered, 1, mean)
apply(centered, 1, sd)
centered.scaled <- pre_process_data(raw.data, scale_pheno = TRUE)
apply(centered.scaled, 1, mean)
apply(centered.scaled, 1, sd)

jinhyunju/icreport documentation built on May 19, 2019, 10:35 a.m.