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 |
what do you mean by data staging area? : Sas-di
What would the following datastep do? Data _null_; Set Dist end=eof; Call Symput("xx"!!left(put(_n_,2.)),&dimension); If EOF then Call Symput('numrows',left(put(_n_,2.))); Run; dimension is a macro variable that is being passed here
How did you use the round function?give an example(don't say it will round to the nearest intger) eg1:round(84.55,.1) =84.6 eg2:round(92.64,.1)=92.6,How it is happening like this tell me the logic,that is how the round function works when we have deimal values?
what is the different between functions and procs that calculate the same simple descriptive statistics? : Sas programming
What is the use of function Proc summary?
What do the mod and int function do? : Sas programming
Please write codes to merge two datasets and keep every record in the first dataset.
how do you derive descriptive statistics?
1 Answers Accenture, Quintiles,
Tell e how how dealt with..
What are the difference between the sas data step and sas procs?
in the flow of data step processing, what is the first action in a typical data step? : Sas programming
How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?