cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
abhi_dp
Level I

Creating a new character column by sorting multiple columns

american_indian

asian

black

declined_race

multiracial

pacific_islander

unavilable_race

white

0

0

0

0

0

0

0

1

0

1

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

0

1

0

0

0

0

0

0

0

0

0

0

0

0

1

0

0

0

0

0

0

0

1

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

 

Is there a simple way (without a script) to create a new column (race) that can sort each of the individual columns information? I would like the new column to be something like this:

.

american_indian

asian

black

declined_race

multiracial

pacific_islander

unavilable_race

white

Race

0

0

0

0

0

0

0

1

white

0

1

0

0

0

0

0

0

asian

0

0

0

0

0

0

0

1

white

0

0

1

0

0

0

0

0

black

0

0

0

0

0

0

0

1

white

0

0

0

0

0

0

0

1

white

1

0

0

0

0

0

0

0

american_indian

0

0

0

0

0

0

0

1

white

 

1 ACCEPTED SOLUTION

Accepted Solutions
jerry_cooper
Staff (Retired)

Re: Creating a new character column by sorting multiple columns

Selecting the columns you want to combine and then choosing Cols->Utilities->Combine Columns... from the menu will give you a dialog box in which you can specify the new column name and then check the "Selected Columns are Indicator Columns" box. Clicking OK will create the column you are looking for. Note that if a row could have more than one "1" you should also check the "Multiple Response" box, in which case, the entry in the new column will be the column names concatenated by the character chosen for delimiter ("," is the default).

 

Hope this helps.

-Jerry  

View solution in original post

3 REPLIES 3
Georg
Level VII

Re: Creating a new character column by sorting multiple columns

Can be done by a formula using the if statement, there you are most flexible and can use conditions on other columns or even combinations of columns.
Georg
jerry_cooper
Staff (Retired)

Re: Creating a new character column by sorting multiple columns

Selecting the columns you want to combine and then choosing Cols->Utilities->Combine Columns... from the menu will give you a dialog box in which you can specify the new column name and then check the "Selected Columns are Indicator Columns" box. Clicking OK will create the column you are looking for. Note that if a row could have more than one "1" you should also check the "Multiple Response" box, in which case, the entry in the new column will be the column names concatenated by the character chosen for delimiter ("," is the default).

 

Hope this helps.

-Jerry  

abhi_dp
Level I

Re: Creating a new character column by sorting multiple columns

Thank you! That was easy