Want to split a data frame based on row number, in SAS, it can be achived like this:
data d1 d2 d3;
set mydata;
if N le 200 then output d1,
if N between 201 and 500 then output d2;
else output d3;
run;
how to do the same procedure by R-Studio? Thank you!