View source: R/set_X_attributes.R
set_X_attributes | R Documentation |
sets three attributes for matrix X
set_X_attributes(X, center = TRUE, scale = TRUE, LD = NULL)
X |
an N by P data matrix that can be either a trend filtering matrix or a regular dense/sparse matrix |
center |
boolean indicating centered by column means or not |
scale |
boolean indicating scaled by column standard deviations or not |
X with three attributes e.g. attr(X, 'scaled:center') is a p vector of column means of X if center=TRUE, a p vector of 0s otherwise. attr(X, 'scaled:scale') is a p vector of column standard deviations of X if scale=TRUE, a p vector of 1s otherwise. attr(X, 'd') is a p vector of column sums of X.standardized^2, where X.standardized is the matrix X centered by attr(X, 'scaled:center') and scaled by attr(X, 'scaled:scale'). attr(X, 'scaledX') returns the transformed X matrix after mean and standard deviation adjustment of its columns. attr(X, 'LD') returns the correlation or the LD matrix of the P variables of the matrix X.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.