cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

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