imputeBetasMatrixByMean | R Documentation |
Impute Missing Values with Mean This function replaces missing values (NA) in a matrix, default is row means.
imputeBetasMatrixByMean(mx, axis = 1)
mx |
A matrix |
axis |
A single integer. Use 1 to impute column means (default), and 2 to impute row means. |
A matrix with missing values imputed.
mx <- cbind(c(1, 2, NA, 4), c(NA, 2, 3, 4))
imputeBetasMatrixByMean(mx, axis = 1)
imputeBetasMatrixByMean(mx, axis = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.