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
- :
- Discussions
- :
- JSL: Row states assignment

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

Jan 25, 2017 2:17 PM
(2896 views)

I am still new to the row state idea and implementation.

Can anyone tell me the syntax for selecting the first 50 rows of a data table and applying radom markers(preferably variety of markers and colors) and colors as row states ?

I really appreciate it. Thank you

2 ACCEPTED SOLUTIONS

Accepted Solutions

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

Here is a sample script working on the Big Class sample data table. I think it will give you an idea on how to do what you asked

```
names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
// To color the first 20 rows, the rows outside of that
// limit need to be excluded from the coloring
dt << select where(Row()>20);
dt << hide and exclude(1);
dt << color or mark by column("sex", marker theme(hollow));
dt << color or mark by column("age");
dt << hide and exclude(0);
dt << clear select;
```

Jim

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

```
dt = Open( "$sample_data/big class.jmp" );
// http://www.jmp.com/support/help/Row_State_Functions.shtml
dt << setrowstates(
J( N Rows( dt ), 1/*cols*/,
Random Integer( 0, 15 ) * 16 // marker bits 4-7
+ Random Integer( 0, 127 ) * 256 // color bits 8-14
)
);
```

Craige

2 REPLIES

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

Here is a sample script working on the Big Class sample data table. I think it will give you an idea on how to do what you asked

```
names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
// To color the first 20 rows, the rows outside of that
// limit need to be excluded from the coloring
dt << select where(Row()>20);
dt << hide and exclude(1);
dt << color or mark by column("sex", marker theme(hollow));
dt << color or mark by column("age");
dt << hide and exclude(0);
dt << clear select;
```

Jim

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

```
dt = Open( "$sample_data/big class.jmp" );
// http://www.jmp.com/support/help/Row_State_Functions.shtml
dt << setrowstates(
J( N Rows( dt ), 1/*cols*/,
Random Integer( 0, 15 ) * 16 // marker bits 4-7
+ Random Integer( 0, 127 ) * 256 // color bits 8-14
)
);
```

Craige