i have a dataset with 100000 records. i want 100 records
from that dataset and create a dataset.we need to pick the
observations random order like
100obs,500obs,1020obs,1890obs,2565obs like that i need 100
obs in random order? how can we create this one?
Answer Posted / suri
1)data ds2;
do i=100,1020,1890,2565;
set ds1 point=i;
output;
end;
stop;
run;
2)data ds2;
set ds1;
where _n_ in(100,1020,1890,2565);
run;
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
what is ae onset date n what is RDS
What are SAS/ACCESS and SAS/CONNECT?
explain what is factor analysis? : Sas-administrator
what is metadata? : Sas-bi
What do you know about sas and what we do? : sas-grid-administration
Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??
How do you delete duplicate observations in sas?
What do you code to create a macro? : sas-macro
do you prefer proc report or proc tabulate? Why? : Sas programming
Explain how you can debug and test your SAS program?
What are pdv and it functions?
Explain the main difference between the sas procedures and functions? : Sas-administrator
what are several options for creating reports in web report studio? : Sas-bi
What are the differences between proc means and proc summary?
What are the uses of sas?