Learn R Programming

plmmr (version 4.2.3)

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 with the standardized matrix, vectors with the centering/scaling values, and a vector with the indices of nonsingular columns

Arguments

X

a matrix

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 big_std() -- see src/big_standardize.cpp