If you have a data set that contains 100 variables, but you
need only five of those, what is the code to force SAS to
use only those variable?
Answers were Sorted based on User's Feedback
Answer / sindhura
new_data_set ( will have the five variables with variable
names var1, var2, var3, var4, var5)
data new_data_set;
set old_data_set( keep = var1 var2 var3 var4 var5);
run;
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / mohan reddy
U CAN USE THE KEEP OPTION.
EX
DATA EMP(KEEP=NAME AGE SAL ADD LOC);
SET EMPLOYEE;
RUN;
Is This Answer Correct ? | 3 Yes | 4 No |
Answer / sandeep reddy
I think we have to use OBS=5
and mention FIRSTOBS=(THE FIRST OBSERVATION FROM WHERE U
WANT)
Is This Answer Correct ? | 1 Yes | 19 No |
How would you delete duplicate observations?
what is the difference between informat$8. $char8.
How necessary is it to be creative in your work?
What is PDV?
Describe a time when you were really stuck on a problem and how you solved it?
how to remove the duplicates by proc sql?
what is the difference between floor and ceil functions in sas? : Sas-administrator
PROC SQL always ends with QUIT statement.Why cant you use RUN in PROQ SQL ?
What is the purpose of trailing @ and @@? How do you use them?
How would you invoke a macro? : sas-macro
what are the advantages of using SAS in clinical data mangement? why should not we use other software products in managing clinical data?
There is a river notoriously known for it?s large crocodile population. With ease, how do you safely cross it?