I have the example code:
data have;
input foo @@;
cards;
1 2 3 4 5 1 3 1 3 5 5 5
;
run;
proc format;
value wide (default=20)
1 = 'VERY SATISFIED'
2 = 'SATISFIED'
3 = 'DISSATISFIED'
4 = 'VERY DISSATISFIED'
other = 'NOT APPLICABLE';
value thin (default=20)
1, 2 = 'SATISFIED'
3, 4 = 'DISSATISFIED'
other = 'NOT APPLICABLE';
run;
options missing=' ';
proc report data=have nowd spanrows out=foo;
columns foo=ord foo=cnt foo=bar(n) foo=baz(n);
define ord / group order=internal;
define cnt / analysis n noprint;
define bar / group format=wide.;
define baz / group format=thin.;
run;
Which produces output like
foo
foo
n
foo
n
1
VERY SATISFIED
3
SATISFIED
3
2
SATISFIED
1
SATISFIED
1
3
DISSATISFIED
3
DISSATISFIED
3
4
VERY DISSATISFIED
1
DISSATISFIED
1
5
NOT APPLICABLE
4
NOT APPLICABLE
4
How instead to I get results like the following?
foo
foo
n
foo
n
1
VERY SATISFIED
3
SATISFIED
4
2
SATISFIED
1
3
DISSATISFIED
3
DISSATISFIED
4
4
VERY DISSATISFIED
1
5
NOT APPLICABLE
4
NOT APPLICABLE
4
... View more