How to create a new dataset only duplicate observations in
proc sort procedure?
Answer / Rahul Kumar Mishra
To create a new dataset with duplicate observations using the `PROC SORT` procedure in SAS, you can use the `OBS=COUNT(*)` option in the PROC SORT step. Here's an example:nn```sqlnDATA new_dataset; nSET old_dataset; nBY variable1 variable2...; nRUN; nPROC SORT DATA = new_dataset OUT = duplicates; nBY variable1 variable2...; nOBS = COUNT(*); nRUN; nDATA final_dataset; nMERGE new_dataset (RENAME=(variable1=new_var1 new_variable2=new_var2 ...)) n duplicates (RENAME=(variable1=old_var1 old_variable2=old_var2 ...)); nBY variable1 variable2...; nRUN; n```nThis code creates a new dataset named `new_dataset` with duplicate observations and then merges it with the original dataset containing unique observations to produce the final dataset.
| Is This Answer Correct ? | 0 Yes | 0 No |
How will you prove that java swing is multithreaded?
the channel in the data communication model can be? option a.postal mail serv. b telephon lines c.radio signals d. all the above
2 Answers iNautix, National Investment Commission,
hi this is uday i want prepare for nic exam if any one have previous question papers please send me or atlest guide me how to prepare my ID is udaykiran4u@in.com
Why multiple inheritance is removed in java?
< DL Compact > tag is used for
What is meant byStatic Variable ?
Number of null pointers in any binary tree
Full from of MP3?
What language / script is used to validate web page
What is the first message line that any language learning prints on the screen? and why?
4. What is the need of START 0? Instead if can we use any other numeric? If we use what will happen?
what is the BAM? where we can use it in BizTalk server?