cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Pro extension simulates Bayesian Optimization runs. Prediction formulas stand in for experimental results. Run simulations and compare results. Download and use the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
graphical
Level I

Convert numeral to letter in adjacent column

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

Recommended Articles