BookmarkSubscribeRSS Feed
Tadeu1
Fluorite | Level 6

Dear SAS Users.                                                                                                                                                                                What is the easiest way to make a program (code) in SAS to draw the chernoff faces?                                                                                                                                                                                                                                                            I have a fictitious data set...                                                                                                                                                          

data faces;
input id var1 var2 var3 var4 var5 var6 var7 var8 var9 var10 @@;
datalines;
1 3 4 5 2 5 4 3 2 1 5 2 4 2 3 5 4 3 4 2 2 3 5 2 2 4 3 2 4 4 3
4 1 5 1 3 2 5 1 3 4 5 4 3 5 2 3 1 4 5 2 6 4 1 4 2 5 3 3 2 4
6 3 4 3 5 2 1 4 3 4
;
run;
proc print data=faces;
run;

proc standard data=faces mean=0 std=1 out=norm_faces;
var var1-var10;
run;

1 REPLY 1
Tom
Super User Tom
Super User

Did you try Michael Friendly's macro?

https://www.datavis.ca/sasmac/faces.html

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1597 views
  • 3 likes
  • 2 in conversation