A helper function to standardize matrices
standardize_in_memory(X, tocenter = TRUE)a list with the standardized matrix, vectors with the centering/scaling values, and a vector with the indices of nonsingular columns
a matrix
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