Recently in the SAS Community Library: SAS' @AndyRavenna publishes the second of two posts that uses statistics and machine-learning objects in SAS Visual Analytics to address real-world business problems.
I am creating a bar plot but would like to have the data labels inside the bars at the bottom. Here is my code so far. Thanks! PS. Also - when I insert the sas code here, how do I make it look like the original sas code (colors)? ๐ data test;
input id group var;
cards;
1 1 2.236
2 1 4.569
3 2 3.694
4 2 1.256
;
proc sgplot data=test;
vbar group / response=var stat=mean datalabel group=group fillattrs=(color=royalblue) DATALABELATTRS=(size=14);
xaxis display=(noline noticks) labelattrs=(size=16) valueattrs=(size=16) ;
yaxis display=(noline) labelattrs=(size=16) valueattrs=(size=16);
keylegend / noborder location=outside position=bottom valueattrs=(size=12);
format var 6.2;
title height=16pt 'var by group';
run;
quit;
... View more
Hi all,
suppose to have the following dataset:
data DB;
input ID :$20. City :$20. School :$20. Parents :$20.;
cards;
0001 0 0 0
0001 1 1 1
0004 1 0 0
0004 0 0 1
0004 0 0 0
0005 0 1 1
0006 1 0 0
0006 1 1 1
0006 1 1 0
....
;
I'm trying to merge all the variables to get the following:
data DB1;
input ID :$20. Index :$20.;
cards;
0001 0
0001 1
0004 1
0004 1
0004 0
0005 1
0006 1
0006 1
0006 1
....
;
The rule is: if there is at least one "1" in "City", "School", "Parents" then Index = 1 otherwise 0. I tried to use coalesce but it takes a lot of time because the variables to be collapsed are 10 but the rows are 30.000. Is there an alternative to do the job?
Thank you in advance.
... View more
data test; input id fname $4. lname $5. age; cards; 123 abc1 def1 24 124 abc2 def2 25 125 abc3 def3 26 ; run;
data test2; input id state $7. county $9. ; cards; 123 state1 county1 124 state2 county2 125 state3 county3 ; run;
options orientation=landscape; ods pdf file="location\name.pdf"; Title1 "Test"; ods proclabel='';
proc report data=test contents='' headline nowindows ;by id ; columns id fname lname age; run;
proc report data=test2 contents='' headline nowindows ;by id ; columns id state county; run;
ods pdf close;
Iam looking only one table of contnets for both tables on left side ? is there any i can do and get the ouput ?
... View more