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 move from signal modeling to system modeling at the first JMP Aerospace Analytics webinar. Register. June 18, 1 p.m. US Eastern Time.

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