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

- JMP User Community
- :
- Discussions
- :
- Re: Copy rows and change one column value

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

Highlighted

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

Created:
Mar 15, 2017 10:39 AM
| Last Modified: Mar 15, 2017 10:40 AM
(7236 views)

I'm finding the row documentation very frustrating. Is it possible to copy an entire row and add it to the current data table? My rows have many columns so I do not want to go through every column name doing this.

Alternatively, if it's possible to make a single one-way graph from two different data tables, then this will also solve my problem. Does JMP have that capability?

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

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

```
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// select a row
dt << select where( Row() == 5 );
// subset the data
dtsel = dt << subset( invisible, selected rows( 1 ), selected columns( 0 ) );
// put the tables together
dt = dt << Concatenate( dtsel, append to first table( 1 ) );
// delete the unneeded supbet table
colose( dtsel, nosave );
```

Jim

5 REPLIES 5

Highlighted
##

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

Re: Copy rows and change one column value

You could make the one row a subset table, and then concatenate it with the larger table.

Highlighted
##

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

Re: Copy rows and change one column value

Can you please reply with the JSL scrip for doing so?

Highlighted

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

```
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// select a row
dt << select where( Row() == 5 );
// subset the data
dtsel = dt << subset( invisible, selected rows( 1 ), selected columns( 0 ) );
// put the tables together
dt = dt << Concatenate( dtsel, append to first table( 1 ) );
// delete the unneeded supbet table
colose( dtsel, nosave );
```

Jim

Highlighted
##

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

Re: Copy rows and change one column value

Thank you this worked for me and I've obtained my end goal.

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

Re: Copy rows and change one column value

Here's an example that uses Big Class. I make a subset table using row 8, and then append it back to the original Big Class table.

```
dt1 = open("$sample_data/Big Class.jmp");
// Make a subset using row 8
dt2 = dt1 << Subset( Selected Rows( 0 ), Rows( [8] ),
Selected columns only( 0 )
);
// Concatenate the new table back to big class
dt1 << concatenate(dt2, append to first table);
```

Article Labels

There are no labels assigned to this post.