- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Sampling data every n points
Created:
Feb 11, 2017 04:51 PM
| Last Modified: Feb 11, 2017 2:27 PM
(2989 views)
| Posted in reply to message from SPradh 02-11-2017
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