printing - how to print odd numbered observations from a dataset SAS -


i have simple question, unfortunately cannot seem solve myself. how print observations odd observation number data set?

one way might data step view. assuming have data set named "mysasdata", try this:

data my_view / view=my_view;    set mysasdata;    if mod(_n_,2) = 1; run; proc print data=my_view; run; 

if wanted "even" observations, use if mod(_n_,2) = 0;. however, note observation numbers displayed proc print relative view , not original data set.

data step views useful things this.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -