z**o 发帖数: 149 | 1 For data a1:
data a1;
input x$ y1 y2 y3 y4;
datalines;
1 2 1 2 3
2 4 2 5 8
3 6 9 7 8
4 8 4 6 5
;
want to check if y1-yx =1 or not:
for _n_=1, I want to check if y1=1;
for _n_=2, I want to check if y1-y2=1;
for _n_=3, I want to check if y1-y3=1;
is there a way to put a value of one variable into another variable name?
like: array y(*) y1-y&x.; ?
Thanks a lot for BIG NIU!! |
|