Subscribe Bookmark RSS Feed

How to reformat a data table

ptnguyen

Community Trekker

Joined:

Oct 7, 2011

I have a multiple-row table of which the columns are "lot", "x", "y", "name" and "value" 

lotxynamevalue
111parameter 1200
152parameter 1210
138parameter 1198
111parameter 230
152parameter 231
138parameter 229.5
211parameter 1203
252parameter 1197
238parameter 1205
211parameter 233
252parameter 228.7
238parameter 229

How do I wirte a JMP script to reformat the table into

"lot", "x", "y", "parameter 1", "parameter 2"

lotxyparameter 1parameter 2
11120030
15221031
13819829.5
21120333
25219728.7
23820529
1 REPLY
pmroz

Super User

Joined:

Jun 23, 2011

You would use the split command:

dt << Split( Split By( :name ), Split( :value ) )

To get this JSL code, click on Tables > Split and enter the following:

1227_Split.png

After doing this, click on the red triangle next to Source in the resulting table and select Edit.  This will bring up the JSL.