Transforming tidy DataTable to pair-wise Data TableHi, I have an example data table where each row is a specific observation at a given time point. I want to transform this table such that each sample (and associated metadata) gets its own column and the time point values are now distinct columns. I have a short script could read the different values in the Time of Measurement (hr) column from the original data table and then make different columns from those values. But I am having trouble thinking of the best way to fill the new table based on the time and the metadata (sample name included). Anyone have any advice? I have attached the original data table (tidy) and the result I want (paired).
Here is the script that I have:
dt1 = open("JMP_discussion tidy table.jmp");
dt1 << clear row states;
dt2 = New Table ("Paired DT");
summarize(unique_values=by(dt1:Name("Time of Measurement (hr)")));
for (i = 1, i <= N Items(unique_values),i++,
dt2 << New Column(unique_values[i], Numeric)
);
Re: Transforming tidy DataTable to pair-wise Data TableIf I am interpreting what you want, you can easily do this with
Tables==>Split
Open the Split Dialog window and set it up like

Click on OK and it will give you
