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
Post a Comment