how to display duplicated observations in a data using base
sas.

Answer Posted / prakash hullathi

use frequency procedure with single column
data dups;
input var1;
datalines;
1
2
3
4
4
3
5
6
;
run;
proc freq data=dups;
tables var1/norow nocol nopercent;
run;


The output will be like this


var1 frequency cumulative frequency
1 1 1
2 1 2
3 2 4
4 2 6
5 1 7
6 1 8


here the observations for the variable var1 3 and 4 are
appered 2 times and remaining appeared for 1 time by
seeing the frequency of corresponding variable and
observation

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the data types in sas?

707


What Proc glm does?

729


What system options would you use to help debug a macro? : sas-macro

738


is data integration and etl programming is same? : Sas-di

678


I have a dataset concat having a variable a b & c. How to rename a b to e & f?

884






describe about metadata object? : Sas-di

724


What was the last computer book you purchased? Why?

1997


Explain the use of proc gplot? : sas-grid-administration

644


What is the basic syntax of a sas program?

755


what is null hypothesis? why do you consider that?

2527


Explain the difference between nodup and nodupkey options?

697


What are the parameters of scan function?

731


For what purposes have you used sas macros? : sas-macro

611


What is the good sas programming practices for processing large data sets?

730


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

1813