cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Have your say in shaping JMP's future by participating in the new JMP Wish List Prioritization Survey
Choose Language Hide Translation Bar
AlphaPony501
Level I

How to stack columns?

I have a data set with 22 subjects' active and placebo sides been tested for 4 times at 0w, 4w, 8w and 12w. Now I want to stack those columns of data (Active 0W, 4W, 8W,12W and Placebo 0W, 4W, 8W,12W)into one result column and also create two columns named Active/Placebo and Time to accurately describe each subject's result. I have attached the data table that I have and also the data table that I want to make. How do I do it?

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How to stack columns?

Besides using formulas, you can also split the Label column with following:

  1. Select Label Column
  2. Go to Text to columns in Cols / Utilities / Text to Columns...
  3. Use space as delimiter
  4. Delete Label column and rename the columns
-Jarmo

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: How to stack columns?

Use

     Tables=>Stack

to stack the columns

Then create 2 new columns using these 2 formula.  Both columns should be defined as character columns.

Foe the Acrive/Placebo column

word(1, :label, " ");

For the time column

word(2, :label, " ");
Jim
jthi
Super User

Re: How to stack columns?

Besides using formulas, you can also split the Label column with following:

  1. Select Label Column
  2. Go to Text to columns in Cols / Utilities / Text to Columns...
  3. Use space as delimiter
  4. Delete Label column and rename the columns
-Jarmo
AlphaPony501
Level I

Re: How to stack columns?

Thank you very much for helping out!!!!! It worked!!