i*********e 发帖数: 783 | 1 * E2_5a.sas
*
求下面一个sas 程序改错,谢谢!
* Chapter 2 Exercise 5
*
* Create a counter for each age group.
* Why does the following fail. Can you fix the problem?;
proc sort data=sashelp.class out=cl1;
by age;
run;
data class;
set cl1;
by age;
if first.age then cnt+1;
run;
title 'Count the Age Groups';
proc report data=class nowd;
column cnt age sex, height;
define cnt / order;
define age / group;
define sex /across;
define height/analysis;
run; | i*********e 发帖数: 783 | 2 Create a counter for each age group | s******8 发帖数: 102 | 3 check the document for PROC Report, if need the data in order of SEX
variable as well, for example order by cnt age sex? | s******8 发帖数: 102 | 4 define cnt /order group; |
|