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
Are you involved in writing the inferential analysis plan? Tables specfications?
What is the maximum length of the macro variable?
what is function of retain statment
How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro
what are the best practices to process the large data sets in sas programming? : Sas-administrator
what is hash files in sas and why we are using this one in sas?
Of all your work, where have you been the most successful?
I need level 2 to 5 sas using companies in india
what is sas olap server? : Sas-di
what are all the reports you generated in your recent project?
what is sas business intelligence? : Sas-bi
Give e an example of..
Given an unsorted data set, how to read the last observation to a new data set?
Mention common programming errors committed in sas ?
hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?