DATA Step, Macro, Functions and more

Selecting every 10th observation from a dataset

Reply
N/A
Posts: 0

Selecting every 10th observation from a dataset

I would like to create a subset to of data by selecting every 10th record, does anyone know how to do this? Thanks in advance!!
Respected Advisor
Posts: 3,799

Re: Selecting every 10th observation from a dataset

Posted in reply to deleted_user
one possibility using SET and POINT.
[pre]
data every10;
do point = 10 to nobs by 10;
set sashelp.shoes point=point nobs=nobs;
output;
end;
stop;
run;
[/pre]
N/A
Posts: 0

Re: Selecting every 10th observation from a dataset

Posted in reply to data_null__
Thanks! This is exactly what I needed.
Ask a Question
Discussion stats
  • 2 replies
  • 949 views
  • 0 likes
  • 2 in conversation