| diffrows | R Documentation |
Differences between Matrix Rows
diffrows(x)
x |
matrix |
matrix with one row less than in input matrix x and each row
i representing the difference x[i+1, ]-x[i, ] between rows
i+1 and i in x
x <- matrix(1:12, nrow = 3)
d <- diffrows(x)
x[2, ] - x[1, ] == d[1, ]
x[3, ] - x[2, ] == d[2, ]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.