rearrange table by scriptI am new to the script.
I have a table like this:
| Last name | Frist name | Items | Value |
| Wayne | Bruce | Age | 35 |
| Wayne | Bruce | Height | 180 |
| Wayne | Alice | Age | 23 |
| Wayne | Alice | Height | 172 |
| Paker | John | Age | 19 |
| Paker | Peter | Age | 25 |
| Paker | John | Height | 185 |
| Paker | Peter | Height | 178 |
And would like to convert it to this format:
| Last name | Frist name | Age | Height |
| Wayne | Bruce | 35 | 180 |
| Wayne | Alice | 23 | 172 |
| Paker | John | 19 | 185 |
| Paker | Peter | 25 | 178 |
I can successfully do this by using jmp subset-> rename column name -> update (with matching column) from table menu. Could someone help for the script, if assuming the data set has uncertain number of people and uncertain number of items?
Thanks a lot!
Re: rearrange table by scriptThank you all!Re: rearrange table by scriptTables -> Split will do exactly what you're looking for.

After putting your columns in the dialog and clicking OK. You'll find a Source script in the resulting data table.

Right click on the Source script and choose Edit to see the script to reproduce the split.

Re: rearrange table by scriptThis is a simple table Split
Tables==>Split
Use Item as the Split By column,
Value as the Split Columns
and Last Name and First Name as the Group columns.
Run it interactively, and then go to the output table and edit the source entry and you will see the script to use to implement it in JSLRe: rearrange table by scriptIt may not be exactly what you are looking for but have you tried the Split Table feature? It is much faster than the rather convoluted method you described.
Here is how to use it: 1) split column: Value; 2) Split by: Items; 3) Grouping: First Name; Keep All Columns