BookmarkSubscribeRSS Feed
Sanscrit_2prov
Obsidian | Level 7

Hi:

In SAS IML there is a function called ALLCOMB that can create a matrix of all possible combinations. This is a very helpful function but if the number of combinations is for n=large it doesn't work as well from an efficiency point of view. I was wondering if any one has created hash tables of all possible combinations to improve the efficiency. I know how to either use allcomb or do loops to create a matrix but instead I would like to create a Hash table lookup of the combinations in each row. Thanks   

2 REPLIES 2
PeterClemmensen
Tourmaline | Level 20

@Sanscrit_2prov welcome to the SAS Community 🙂 

 

Can you provide a small example of your problem and where it goes wrong?

Ksharp
Super User

Check GRAYCODE Function  in data step.

I would not think Hash could contain so many combinations. and it must be exploded .

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 2 replies
  • 741 views
  • 0 likes
  • 3 in conversation