我有数据集sample, 有变量time, ad, ce, wr, 其中ad, ce和wr都是不规则的变量名。我现在如果想做scatter plot的话只能分开写成三段sgplot。有没有什么简单的方法, 可以把ad, ce和wr写成类似array或者定义一个宏变量呢? 这样我只要一个sgplot就可以解决问题了。谢谢!
data sample;
input time ad ce wr;
datalines;
0 1 3 5
1 2 4 3
2 1 2 3
;
run;
title 'ad plot';
proc sgplot data=sample;
scatter x=time y=ad;
run;
title 'ce plot';
proc sgplot data=sample;
scatter x=time y=ce;
run;
title 'wr plot';
proc sgplot data=sample;
scatter x=time y=wr;
run;