【SAS】高级SAS面试问答.pdfVIP

  • 50
  • 0
  • 约1.05万字
  • 约 15页
  • 2020-02-14 发布于广东
  • 举报
1. Two ways to select every second row in a data set data example; set sashelp.class; if mod(_n_,2) eq 0; run; MOD Function returns the remainder from the division of the first argument by the second argument. _N_ corresponds to each row. The second row would be calculated like (2/2) which returns zero remainder. data example1; do i = 2 to nobs by 2; set sashelp.class point=i nobs=nobs; output; end; stop; run; 2. How to select every second row of a group Suppose we have a table sashelp.class. We want every second row by variable sex. proc sort data = sashelp.class; by sex;

文档评论(0)

1亿VIP精品文档

相关文档