How would you code a merge that will keep only the
observations that have matches from both sets?
Answers were Sorted based on User's Feedback
Answer / vijay
Dear Guest,
Merge won't accept NODUPKEY option. it is for PROC SORT.
the following code will get only matched observations in
both datasets
data three;merge one (in=a) two (in=b);by **;if a and b;run;
Is This Answer Correct ? | 12 Yes | 0 No |
Answer / murray
Both answers #2 and #3 will work fine, however the '= 1'
part is superfluous, and will work fine without.
Is This Answer Correct ? | 0 Yes | 3 No |
Answer / san
data c;
merge data a(in=a)
dat b(in=b);
if a=1 and b=1;
by<common column>;
run;
Is This Answer Correct ? | 0 Yes | 5 No |
what other SAS features do you use for error trapping and data validation?
What are Dashboard reports?And significance of these in analysis?
How do you read in the variables that you need?
What is the function of Stop statement in a SAS Program?
What are the advantages of using sas?
Dear all, proc means data=dsn noprint completetypes; class trtmntgroup /preloadfmt; output out=tot n=n; format trtmntgroup trtf. ; by vstgrp descending severity; run; This is the code I used for AE table. I got the values without giving the variable ‘trtmntgroup(numeric)’ in var statement. And if I give the var statement for that variable i’m getting the same values.How is that possible? What is the difference between class and var statement? Could any one explain me how does proc means work at the back end. And what is the difference between _freq_ value and N value in proc means. Thanks and regards, Rajesh.
how to import XTP files into SAS datasets?
1 Answers Barclays, Institute For Plasma Research,
What is the maximum and minimum length of macro variable
What is the registered Key word is sas????
Are you involved in writing the inferential analysis plan? Tables specfications?
how does sas handle missing values in an update? : Sas programming
what is difference in window SAS & Unix SAS.....how do define working environment in both???