Please see the following data set:
Bob Paul 120 Tina Adele 111 Scott Joe 100 Betty Trish 97 Mark Adam 95
Three columns: Name#1, Name#2, Score.
I would like to join the columns to produce the following:
Bob 120 Paul 120 Tina 111 Adele 111 Scott 100 Joe 100 Betty 97 Trish 97 Mark 95 Adam 95
Two columns: Name#1 OR Name#2, Score
How can this be done efficiently?
Any help greatly appreciated.
set have (rename=name1=name keep=(name score))
Have (rename=name2=name keep=(name score));
You may need to play with the keep statement. I never remember if you reference a renamed variable with the original or new name in the keep section.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.