Hi,
I am trying to do this question in code, the question is:
Write observations to two new data sets (high_scores and low_scores) depending on the value of high_score (1 - high scores, 0 - low scores). Exclude the variable high_score?
The dataset is called WORK.LASVEGAS. Any help with this will be much help.
Data work.high_scores (drop=high_score) work.low_scores (drop=high_score);
set work.lasvegas;
if high_score= 1 then output work.high_scores;
else if high_score=0 then output work.low_scores;
run;
What do you have so far? Happy to help with homework, not so much to just provide an answer.
@Goffy123 wrote:
Hi,
I am trying to do this question in code, the question is:
Write observations to two new data sets (high_scores and low_scores) depending on the value of high_score (1 - high scores, 0 - low scores). Exclude the variable high_score?
The dataset is called WORK.LASVEGAS. Any help with this will be much help.
Data work.high_scores (drop=high_score) work.low_scores (drop=high_score);
set work.lasvegas;
if high_score= 1 then output work.high_scores;
else if high_score=0 then output work.low_scores;
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.
Ready to level-up your skills? Choose your own adventure.