cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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!!

Recommended Articles