楼主: gxa1
4053 11

[原创博文] 移动式提取数据集中20个数据作为新的数据集!怎么做? [推广有奖]

11
bobguy 发表于 2011-10-13 10:29:19
Using a group variable to indicate a data group is much better idea than outputting data to many data sets.

Here is an example,

data t1;
  do ord=1 to 31;
     x=ranuni(123);
         output;
  end;
run;

data t2;
  do group=1 to nobs-20+1;
     do pts=group to group+(20-1);
     set t1 point=pts nobs=nobs;
         output;
     end;
   end;
  stop;
run;

proc print;run;

12
gxa1 发表于 2011-10-14 08:57:09
谢谢大家帮忙,搞定啦

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-30 12:00