Column-wise differences
Column-wise differences.
coldiffs(x)
x |
A matrix with numbers. |
This function simply does this function x[, -1] - x[, -k], where k is the last column of the matrix x. But it does it a lot faster. That is, 2nd column - 1st column, 3rd column - 2nd column, and so on.
A matrix with one column less containing the differences between the successive columns.
Manos Papadakis
R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.
x <- matrix( rnorm(50 * 10), ncol = 10 ) res<-coldiffs(x) x<-NULL
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.