how to display duplicated observations in a data using base
sas.
Answer Posted / m.sivakumar
data dups;
input var1;
datalines;
1
2
3
4
4
3
5
6
;
run;
proc sort data=dups;
by var1;
run;
data dups1;
set dups;
by var1;
if not(first.var1 and last.var1) then output;
run;
proc print data=dups;
run;
proc print data=dups1;
run;
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming
What are the statements in proc sql?
If you use a symput in a data step, when and where can you use the macro variable? : sas-macro
How sas treats the dsd delimiters?
What is the general format of function in sas? : sas-grid-administration
what is factor analysis? : Sas-administrator
what are the benefits of data integration? : Sas-di
what is metadata? : Sas-bi
Explain input and put function?
Define run-group processing?
What is the length assigned to the target variable by the scan function?
Mention sas system options to debug sas macros.
Differences between where and if statement?
How to create an external dataset with sas code?
how many display types available in sas bi dashboard? : Sas-bi