BookmarkSubscribeRSS Feed
Morse_Bill
Obsidian | Level 7

looking for CAS Actionset.action that corresponds to PROC RANK.  

Is there a "matrix" in the documentation to help with this ? 

2 REPLIES 2
sbxkoenk
SAS Super FREQ

Hello,

 

What do you want to do with PROC RANK??

 

I only know about this :

(and nothing about a "matrix")

 

And this :

CAS Actions and Action Sets - a brief intro
By Peter Styliadis on SAS Users August 6, 2021
https://blogs.sas.com/content/sgf/2021/08/06/cas-actions-and-action-sets-a-brief-intro/

 

Cheers,

Koen

DerylHollick
SAS Employee

The topk or groupby actions do some basic ranking.

data casuser.cake;
   input Name $ 1-10 Present 12-13 Taste 15-16;
   datalines;
Davis      77 84
Orlando    93 80
Ramey      68 72
Roe        68 75
Sanders    56 79
Simms      68 77
Strickland 82 79
;
proc rank data=casuser.cake out=order descending ties=low;
   var present taste;
   ranks PresentRank TasteRank;
run;
proc print data=order;run;

proc cas;
simple.topk result=r1 / table={name="cake"}
      inputs={"Name"}, topk=7, bottomk=0, includeMisc=FALSE, weight="Present";  
simple.topk result=r2 / table={name="cake"}
      inputs={"Name"}, topk=7, bottomk=0, includeMisc=FALSE, weight="Taste";  
print r1 r2;
quit;

proc cas;
simple.groupby result=r3 / table={name="cake"}, inputs={"Name"}, weight="Present", descending=TRUE;
simple.groupby result=r4 / table={name="cake"}, inputs={"Name"}, weight="Taste", descending=TRUE;
print r3 r4;
quit;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 420 views
  • 0 likes
  • 3 in conversation