cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP 19 is here! See the new features at jmp.com/new.
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
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