BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
user24feb
Barite | Level 11

Hello!

I would like to split network-data containing "from" and "to" items into independent "clusters". For example:

Data Have;
  Input From To;
  Datalines;
200 401
200 460
460 402
460 403
461 400
299 500
299 501
500 508
500 509
;
Run;

Data Want;
  Input Cluster_Nr Members $;
  Datalines;
1 200_460_461_403_402_401_400
2 299_500_501_508_509
;
Run;

This is, there is no path leading from 299 to 400 or from 200 to 509, etc.

My 2 questions are:

1) is there a standard way, this is using for example a SAS/OR procedure, to do this?

2) if there is no standard way to do this, how could it be done?

Thx&kind regards

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Look for the statement CONCOMP in PROC OPTNET of SAS/OR. It finds connected components.

SAS/OR(R) 12.3 User's Guide: Network Optimization Algorithms

PG

PG

View solution in original post

1 REPLY 1
PGStats
Opal | Level 21

Look for the statement CONCOMP in PROC OPTNET of SAS/OR. It finds connected components.

SAS/OR(R) 12.3 User's Guide: Network Optimization Algorithms

PG

PG

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1 reply
  • 356 views
  • 0 likes
  • 2 in conversation