- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
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"})