Pages

Friday, August 2, 2013

Widgets

An Example on how to generate lead values

An Exapmle:

Dataset In05

Obs x
1 1
2 2
3 3
4 4

Code:

data Out05;
merge
In05
In05(
firstobs=2
keep=x
Rename=(x=lead_x)
);
/* by is dropped intentionally */
run;

Output:

Obs x lead_x
1 1 2
2 2 3
3 3 4
4 4 .

No comments:

Post a Comment