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

- JMP User Community
- :
- Discussions
- :
- Re: match values ordering in two data tables

- 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

May 13, 2020 7:27 AM
(560 views)

Dear Community,

I have two data tables and I want to use the same value ordering for a certain variable that appears in both. I used "row order levels" option for dt1. How can I extract the value order and easily apply it to dt2?

Thanks,

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

- Create a new column in the data table that you want to know the sort order for and set it's formula equal to
`Row()`

- Use Tables==>Summary specifying the column in the data table you have Row Level Ordering for as the Grouping column, and for the statistical column, specify Min for the column that has the row() formula specified for
- Update the data table you want to set the ordering on, with the summary data table, matching on the Grouping column.
- Sort the updated table by the column that has the Min row number
- Apply row level ordering to the column in the updated table that you want to have the same order for

Jim

2 REPLIES 2

Highlighted

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

- Create a new column in the data table that you want to know the sort order for and set it's formula equal to
`Row()`

- Use Tables==>Summary specifying the column in the data table you have Row Level Ordering for as the Grouping column, and for the statistical column, specify Min for the column that has the row() formula specified for
- Update the data table you want to set the ordering on, with the summary data table, matching on the Grouping column.
- Sort the updated table by the column that has the Min row number
- Apply row level ordering to the column in the updated table that you want to have the same order for

Jim

Highlighted
##

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

Re: match values ordering in two data tables

Jim,

You are a wizard! Thank you so much.

As some background, I want to plot the ratio of means as a heat map alongside the actual means including st dev error intervals.

So far the only way I can do this is to make a separate summary table of just the means, make a third column of ratio and use the ratio as color. In order to make the heat map easy to read I also sort the rows according to ratio, that way there is a continuous gradient

However When I go back to the original table with all the data in order to make line graph with std dev error bars, i am left with a real mess for the ordering!

This solution worked!

Now if I could only figure out how to add a ratio column to the original data table based on a grouping variable and then use the average ratio as a color.... that may be even better so I could plot the means and a heat map of ratio side by side

Best,

Article Labels

There are no labels assigned to this post.