Hi Guys,
how to remove duplicate values using proc summary and proc tabulate give example
Why do you want to use either of those to remove duplicates in your data?
Best practice is to use PROC SORT with NODUPKEY, a DATA step with FIRST. or LAST., or SQL with DISTINCT, depending on your data structure and the details of your needs.
(PS if that was an interviewer's question, he/she wants the above as answer; the fact that you even think about trying such stupidity during an interview immediately exposes you as a SAS noob).
@BrahmanandaRao wrote:
Hi Guys,
how to remove duplicate values using proc summary and proc tabulate give example
Proc SUMMARY summarizes numeric values and could be done so for groups of BY or Class variables. Not really removing duplicates.
Proc tabulate by default creates a report for people to read and removes nothing and the output data sets created by Proc tabulate are structured quite a bit differently than you might expect, not a good tool for "removing duplicates" in my opinion but useful for certain restructuring issues. Additionally since Proc Tabulate can have multiple Table descriptions in a single procedure the output data set can be quite complicated.
So a very explicit detailed example of starting data and desired result are needed to properly answer a question.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.