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
Abby_Collins14
Level III

How to subset my data every 5 minutes per batch in time column?

Hello,

 

I have a data set that has many batches of data stacked in one column. Another column is time point (1,2,3,4,...). I am trying to select and subset every 5 minute time point (and the first time point) for each batch such that time will be (1,5,10,15,20,..) for each batch.

 

I have tried to use the "select where" and "mod" functions but cannot get it to work.

1 REPLY 1
txnelson
Super User

Re: How to subset my data every 5 minutes per batch in time column?

Given your description, the following should work.....

 

Names Default To Here( 1 );
dt = Current Data Table();

dt << select where( :time point == 1 | Mod( :time point, 5 ) == 0 );

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

Recommended Articles