diff

diff(x, lag=1)

Return lagged differences of x.