mean_center: Mean-centers each variable in a block of data

Description Usage Arguments Value

View source: R/local_preprocessing_functions.R

Description

Mean-centers each variable in a block of data

Usage

1
mean_center(input_data, settings = list(column_means = NULL))

Arguments

input_data

A matrix containing data. The rows indicate the samples, the columns indicate the variables.

settings

A list with a one named elements "column_means". When "column_means" is set, the supplied vector is used for mean substraction. The vectors should have a length equal to the number of variables.

Value

A named list with "preprocessed_data": the mean-centered input_data matrix, and "settings", which is equal to the settings input parameter when set, and otherwise contains the calculated column_means.


GeertPostma/pathmodelr documentation built on Oct. 5, 2021, 4:17 p.m.