cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. ET on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

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

Sampling data every n points

Hi everyone,

 

I am trying to sample data every 50 rows and check if values in a column, F, gives F(50)-F(1)>1. I don't want to use the lag function as it should only sample at row 1, 50, 100, 150 and so on.

 

Thanks in advance!

 

 

 

1 REPLY 1
txnelson
Super User

Re: Sampling data every n points

Use the mod(), "modulus" function:

names default to here(1);
dt= current data table();
dt<<select where(mod(row(),50)==0);
dt << subset(selected rows(1),selected columns(0));

     Help==>Scripting Index==>Functions==>Mod 

Jim

Recommended Articles