cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Choose Language Hide Translation Bar
View Original Published Thread

Convert numeral to letter in adjacent column

graphical
Level I

Hi, hopefully this isn't a dumb question, I'm new to JMP and coding generally. In JMP 18, if I have a column of numerals (0-11) and I want a second column that correlates to this column with letters (a-k) is there a simple formula command I could use to make the second column auto-populate with the corresponding letter for every numeral associated in the adjacent column? 0 = a, 1 = b, etc. 

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
graphical
Level I


Re: Convert numeral to letter in adjacent column

I think I found a solution! By using the Match function and then defining each letter I wanted correlated to the respective numeral it was able to auto-populate in my new column.

View solution in original post

2 REPLIES 2
graphical
Level I


Re: Convert numeral to letter in adjacent column

I think I found a solution! By using the Match function and then defining each letter I wanted correlated to the respective numeral it was able to auto-populate in my new column.

jthi
Super User


Re: Convert numeral to letter in adjacent column

Match is a good option, other could be creating a list of alphabets

 

{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q",
"r", "s", "t", "u", "v", "w", "x", "y"}

and then using the index from your numbers to get the value. Assuming Column 1 has the numbers, you can formula such as (JMP's indexing generally starts from 1)

 

{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r",
"s", "t", "u", "v", "w", "x", "y"}[:Column 1 + 1]

 

You can also use Recode 

jthi_1-1733378256762.png

and it will use Map Value 

Map Value(:Column 1, {0, "a", 1, "b", 2, "c", 3, "d", 4, "e", 5, "f", 6, "g", 7, "h", 8, "i", 9, "j", 10, "k"})
-Jarmo