Learn R Programming

plmmr (version 4.3.0)

standardize_in_memory: A helper function to standardize matrices

Description

A helper function to standardize matrices

Usage

standardize_in_memory(X, tocenter = TRUE)

Value

A list containing the standardized X matrix and associated metadata

Arguments

X

A matrix

tocenter

Should the matrix be centered in addition to scaled? Defaults to TRUE.

Details

This function is adapted from https://github.com/pbreheny/ncvreg/blob/master/R/std.R NOTE: this function returns a matrix in memory. For standardizing filebacked data, use standardize_filebacked() -- see src/big_standardize.cpp