cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.
  • See how to access JMP Marketplace - and - find, create & share add-ins to extend your JMP. Watch video.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
aaronjiang
Level I

Select first/second half of rows to form a subset

I have a question about how to select first half or second of rows to form a subset. I don't want to manually type in 1,2,3,4,5,...,10 (if there are 20 rows) because my rows could be different from time to time. I have a equation that define number of rows that will appear in the original table. Is there anything like select row (1:10) or others that make it easier?

1 REPLY 1
txnelson
Super User

Re: Select first/second half of rows to form a subset

You can use the following JSL

dt=current data table();
dt<<select where(Row()<=N Rows(dt)/2);

dt2=dt<<subset(selected rows(1), selected columns(0));
Jim

Recommended Articles