Hi,
Why call define
works with display
variables but not with analysis
variables ?
proc report data=sashelp.class;
column name--height;
define name / display;
define sex / display;
define age / display;
*define age / analysis mean;
define height / analysis mean;
compute age;
if age=12 then call define(_row_,'style','style=[background=lightpink]');
endcomp;
rbreak after / summarize;
run;
When age
is used as display the row where age=12 will be in lightpink, but by definition, the mean won't be available.
If we change age
to analysis
mean, the mean will be calculated but the rows won't be in lightpinkt.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.