Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: xplore
See also: tdiff

Quantlet: diff
Description: Computes first differences (along the rows) of an array.

Usage: dx = diff(x)
Input:
x array, d1 x d2 x ... x dn
Output:
dx array, (d1-1) x d2 x ... x dn, first differences along the rows of x.

Example:

library("xplore")

randomize (0)

x = (1:4)|6

diff(x)

Result:



Contents of object y

[1,] 0

[2,] 0

[3,] 0

[4,] 0

[5,] 1


Library: xplore
See also: tdiff

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Author: TTK, Marlene Mueller, 970903
(C) MD*TECH Method and Data Technologies, 21.9.2000