given answer B is correct, .. the code is interleaving one data set (sorting effect) and the if statement is removing the second observation "1 A 33" as it is the second one (not FIRST.Y) for the variable Y.
data one;
infile datalines;
input x y $ z;
datalines;
1 A 27
1 A 33
1 B 45
2 A 52
2 B 69
3 B 70
4 A 82
4 C 91
;
data two;
set one;
by X Y;
if first.Y;
run;
proc print data=two noobs;
run;
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
mhminkov
3 years, 5 months ago