turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Sampling data every n points

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 11, 2017 12:41 PM
(304 views)

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 11, 2017 1:51 PM
(299 views)

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