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
- :
- Re: Change Values in a Column

- 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
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Jan 25, 2019 5:24 AM
(3311 views)

I found a script that works well however the time it takes to parse at minimum of 80,000 rows is quite long. This is only 1 wafers worth of data and there is an option to add an entire lot ( 7 more wafers). Which the time it takes to change the values will increase by a lot.

Any suggestions?

Thank you

```
r = dt << Get Rows Where( :testname == "test1" );
Column( dt, "channel" )[r] = "N/A (test1)";
s = dt << Get Rows Where( :testname == "test1" );
Column( dt, "mode" )[s] = "N/A (test1)";
t = dt << Get Rows Where( :testname == "test2" );
Column( dt, "mode" )[t] = "N/A (test2)";
```

1 ACCEPTED SOLUTION

Accepted Solutions

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

Thank you

4 REPLIES 4

Highlighted
##

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

Re: Change Values in a Column

```
r = dt << Get Rows Where( :testname == "test1" );
Column( dt, "channel" )[r] = "N/A (test1)";
s = dt << Get Rows Where( :testname == "test1" );
Column( dt, "mode" )[s] = "N/A (test1)";
t = dt << Get Rows Where( :testname == "test2" );
Column( dt, "mode" )[t] = "N/A (test2)";
// Alternative Approach
r = dt << Get Rows Where( :testname == "test1" );
dt[r,"channel"] = "N/A (test1)";
s = dt << Get Rows Where( :testname == "test1" );
dt[s,"mode"] = "N/A (test1)";
t = dt << Get Rows Where( :testname == "test2" );
dt[t,"mode"] = "N/A (test2)";
```

Best

Uday

Uday

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

Re: Change Values in a Column

As written r and s should be the same rows. Get r , the index of rows where :testname == "test1", and use it for both columns channel and mode.

Also if using JMP13 or later, this syntax could save time.

```
r = dt << Get Rows Where( :testname == "test1" );
dt[r,{"channel","mode"}] = "N/A (test1)";
```

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

Re: Change Values in a Column

Thank you for the quick response. I will try this asap.

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

Thank you