# Centre and scale a simple vector
centredAndScaled(data.frame(1:10))
# Centre and scale each column of a matrix
mat <- as.data.frame(matrix(stats::rnorm(30), nrow = 10, ncol = 3))
centredAndScaled(mat)
Run the code above in your browser using DataLab