logo

This R code is trying to scale the matrix and transform all the

1 Pages135 Words165 Views
   

Added on  2019-09-18

This R code is trying to scale the matrix and transform all the

   Added on 2019-09-18

ShareRelated Documents
This R code is trying to scale the matrix and transform all the values of the matrix in standardised values. The formula for normalising the value is (x - mean)/sdwhere x = value of the particular elementmean = mean of each columnsd = standard deviation of the column#creating a matrix with 3 columns and 3 rowsmatrix_1 = matrix(seq(1,12),ncol=4,nrow=3,byrow=TRUE)matrix_1#calling function matrix_scalem_scl <- matrix_scale(matrix_1)m_scl#function to scale values of matrixmatrix_scale <- function(x) sweep(sweep(x, 2, colMeans(x)), 2, apply(x, 2, sd), '/')
This R code is trying to scale the matrix and transform all the_1

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
bootstrap-and-jackknife Solutions 2022
|10
|1959
|18

Applied Engineering Statistics | Questions-Answers
|33
|3277
|30

The Determinant of Where L is the determinant of Where L is the determinant of Where L is the determinant of Where L is the determinant of Where L is the determinant
|5
|458
|418

Mathematics Determinants-Assignment
|9
|908
|25

PCA definition of the SNAO
|14
|2008
|24

Arbitrary Quadratic - Assignment
|29
|7729
|114