<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: replacing numbers with strings in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/replacing-numbers-with-strings/m-p/222403#M44378</link>
    <description>&lt;P&gt;I agree with Recode ... but there are other options depending on your usage:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. A script with If-Then-Else statements ... so you would have If C1=="1" Then "Horse" and so on.&amp;nbsp; Even for 31, that can get cumbersome ... but possible.&amp;nbsp; I will typically only use this for max of ~6 items.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. LinkID / LinkReference table.&amp;nbsp; I use this a ton - we run loads of experiments in our development line (I am a happy/busy statistician :)&lt;/img&gt; ) with condition keys on the parts we generate done as letters A-Z, and so on.&amp;nbsp; When setting things up I will always have a core table before randomization with the condition in a column and the conditions in other columns. The COndition is made a LinkID&lt;/P&gt;&lt;P&gt;Since we do many tests, in the results we only use the Condition ID (A-Z) and any specific test information (e.g. where on a part we take the data), and then use LinkReference on the Condition in the results table to go back to the Experimental Conditions table.&amp;nbsp; Incredibly powerful!&lt;/P&gt;&lt;P&gt;In your case you could simply have a column with 1-31, and a second column with the values Horse, Cat, Dog, etc.&amp;nbsp; Then use the LinkIDReference feature to get at the values.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Aug 2019 15:36:30 GMT</pubDate>
    <dc:creator>andersonmj2</dc:creator>
    <dc:date>2019-08-20T15:36:30Z</dc:date>
    <item>
      <title>replacing numbers with strings</title>
      <link>https://community.jmp.com/t5/Discussions/replacing-numbers-with-strings/m-p/222348#M44358</link>
      <description>&lt;P&gt;hey,&lt;/P&gt;&lt;P&gt;i have a column COL_A, which has 31 rows for wach number between 1 - 31 ( 31 rows of 1, 31 rows of 2 .... etc), and i want to replace those numbers with 31 strings in a specifiec order, for example:&lt;/P&gt;&lt;P&gt;if my string are in this order: horse, cat, dog ....etc, i want to replace the 1's with horse, the 2's with cat, the 3's with dog...., what is the best and fastest way to do it?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 07:17:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/replacing-numbers-with-strings/m-p/222348#M44358</guid>
      <dc:creator>adham_saif</dc:creator>
      <dc:date>2019-08-20T07:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: replacing numbers with strings</title>
      <link>https://community.jmp.com/t5/Discussions/replacing-numbers-with-strings/m-p/222359#M44360</link>
      <description>I believe the fastest way to make this change would be to use "Recode".&lt;BR /&gt;Go to the column header for the column you want to change the values for, and right click on the header and select "Recode"</description>
      <pubDate>Tue, 20 Aug 2019 09:43:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/replacing-numbers-with-strings/m-p/222359#M44360</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-08-20T09:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: replacing numbers with strings</title>
      <link>https://community.jmp.com/t5/Discussions/replacing-numbers-with-strings/m-p/222403#M44378</link>
      <description>&lt;P&gt;I agree with Recode ... but there are other options depending on your usage:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. A script with If-Then-Else statements ... so you would have If C1=="1" Then "Horse" and so on.&amp;nbsp; Even for 31, that can get cumbersome ... but possible.&amp;nbsp; I will typically only use this for max of ~6 items.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. LinkID / LinkReference table.&amp;nbsp; I use this a ton - we run loads of experiments in our development line (I am a happy/busy statistician :)&lt;/img&gt; ) with condition keys on the parts we generate done as letters A-Z, and so on.&amp;nbsp; When setting things up I will always have a core table before randomization with the condition in a column and the conditions in other columns. The COndition is made a LinkID&lt;/P&gt;&lt;P&gt;Since we do many tests, in the results we only use the Condition ID (A-Z) and any specific test information (e.g. where on a part we take the data), and then use LinkReference on the Condition in the results table to go back to the Experimental Conditions table.&amp;nbsp; Incredibly powerful!&lt;/P&gt;&lt;P&gt;In your case you could simply have a column with 1-31, and a second column with the values Horse, Cat, Dog, etc.&amp;nbsp; Then use the LinkIDReference feature to get at the values.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 15:36:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/replacing-numbers-with-strings/m-p/222403#M44378</guid>
      <dc:creator>andersonmj2</dc:creator>
      <dc:date>2019-08-20T15:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: replacing numbers with strings</title>
      <link>https://community.jmp.com/t5/Discussions/replacing-numbers-with-strings/m-p/222471#M44394</link>
      <description>&lt;P&gt;(Also agree with recode.)&lt;/P&gt;&lt;P&gt;A script for this might look something like this&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$sample_data/big class.jmp" );
dt &amp;lt;&amp;lt; New Column( "group", character );
label = {"baby", "toddler", "toddler", "pre-k", "k", "1st", "2nd", "3rd", "4th", "5th", "6th", "middle", "middle", "middle", "high", "high", "high"};
For Each Row( group = label[age] );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Grouped ages" style="width: 500px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/18938iDEAAA301422FD739/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Grouped ages" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Grouped ages&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The if-then-else approach might be better if your data isn't contiguous, starting at one, or if there are only a few groups.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 10:55:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/replacing-numbers-with-strings/m-p/222471#M44394</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2019-08-21T10:55:01Z</dc:date>
    </item>
  </channel>
</rss>

