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


Please Help Members By Posting Answers For Below Questions

Describe the function and untility of the most difficult SAS macro that you have written.

1813


What is a method to debug and test your SAS program?

832


Give some examples where proc report’s defaults are different than proc print’s defaults?

688


what is treatment emergent events and treatment emregent adverse event

2023


what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming

840






What is the different between functions and PROCs that calculate the same simple descriptive statistics?

1361


If money were no object, what would you like to do?

2789


what is the purpose of _error_? : Sas programming

712


what is the difference between floor and ceil functions in sas? : Sas-administrator

807


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

704


How to convert a numeric variable to a character variable?

721


which date functions advances a date time or date/time value by a given interval? : Sas programming

626


How do you delete duplicate observations in sas?

671


Give an example where SAS fails to convert character value to numeric value automatically?

704


What are the difference between the sas data step and sas procs?

716