How would you delete observations with duplicate keys?
Answers were Sorted based on User's Feedback
Answer / sastechies
2 ways
1.Proc Sort with Dupkey and Noduprecs options
2.Datastep using a combination of first.var and last.var
variables...
However one common mistake one might do with Proc Sort
NoDup here is that missing all the variables in the By
statement..
Read here...
http://sastechies.blogspot.com/2009/12/common-programming-
mistake-with-proc.html
| Is This Answer Correct ? | 0 Yes | 0 No |
What does proc print, and proc contents are used for?
What are the rows present in protocol Violation table?
2 Answers Accenture, Quintiles,
What sas features do you use to check errors and data validation?
Can you calculate the mean, median and mode of the following data set using data step logic? Don't use any function or procedure. data a; input age @@; datalines; 22 32 32 32 43 23 24 56 45 54 28 29 27 26 25 28 30 20 18 37 36 47 46 56 19 20 ; run; I have calculated the mean which i have posted in the answer section.
What is the difference between INPUT and INFILE ?
What does error:1 mean?
which domain is better in sas? clinical trails or banking
what is the difference between sas and other datawarehousing languages?what are the advantages of sas over them?
What are the data types does SAS contain?
what is sas? is a package or tool? give me introduction about sas?
I have a dataset concat having variable a b & c. How to rename a b to e & f?
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?