eDiff {expandFunctions} | R Documentation |
Returns a matrix, the same size as the input matrix X, containing the back difference.
eDiff(X, pad = NA)
X |
R object coercible to matrix |
pad |
Pad the first row with this value; the default is NA. 0 would be another value often used in signal processing. |
Returns a matrix, the same size as the input matrix X, containing the back difference by column. The first row is filled with copies of pad.
eDiff( 1:8 ) eDiff( as.data.frame(1:8) ) eDiff( matrix(1:8,ncol=2) )