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
Describe the function and untility of the most difficult SAS macro that you have written.
What is a method to debug and test your SAS program?
Give some examples where proc report’s defaults are different than proc print’s defaults?
what is treatment emergent events and treatment emregent adverse event
what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming
What is the different between functions and PROCs that calculate the same simple descriptive statistics?
If money were no object, what would you like to do?
what is the purpose of _error_? : Sas programming
what is the difference between floor and ceil functions in sas? : Sas-administrator
If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable? : sas-macro
How to convert a numeric variable to a character variable?
which date functions advances a date time or date/time value by a given interval? : Sas programming
How do you delete duplicate observations in sas?
Give an example where SAS fails to convert character value to numeric value automatically?
What are the difference between the sas data step and sas procs?