<?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: Recode numerical days into Monday, Tuesday, Wednesday etc in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Recode-numerical-days-into-Monday-Tuesday-Wednesday-etc/m-p/353237#M60259</link>
    <description>&lt;P&gt;Here is an example of a script that will create a new column with the desired values&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Create an Example data table
dt = New Table( "Example", add rows( 418 ), New Column( "weekday", set each value( Row() ) ) );

// Create a new column Using a script
dt &amp;lt;&amp;lt; New Column( "Weekday 2",
	character,
	set each value(
		theList = {"Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday"};
		theList[Mod( :weekday, 7 ) + 1];
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 Jan 2021 12:29:39 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2021-01-27T12:29:39Z</dc:date>
    <item>
      <title>Recode numerical days into Monday, Tuesday, Wednesday etc</title>
      <link>https://community.jmp.com/t5/Discussions/Recode-numerical-days-into-Monday-Tuesday-Wednesday-etc/m-p/353216#M60257</link>
      <description>&lt;P&gt;Hi, I have a column that is indicated as days, in ordinal data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I recode it, such that they are (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 = Wednesday&lt;/P&gt;&lt;P&gt;2 = Thursday&lt;/P&gt;&lt;P&gt;3 = Friday&lt;/P&gt;&lt;P&gt;4 = Saturday&lt;/P&gt;&lt;P&gt;5 = Sunday&lt;/P&gt;&lt;P&gt;6 = Monday&lt;/P&gt;&lt;P&gt;7 = Tuesday&lt;/P&gt;&lt;P&gt;9&amp;nbsp; =Wednesday&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;416 = Friday&lt;/P&gt;&lt;P&gt;417 = Saturday&lt;/P&gt;&lt;P&gt;418 = Sunday&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to recode it without me having to type Mon - Sun all the way from 1 to 418?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:25:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recode-numerical-days-into-Monday-Tuesday-Wednesday-etc/m-p/353216#M60257</guid>
      <dc:creator>Madwolf</dc:creator>
      <dc:date>2023-06-10T23:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Recode numerical days into Monday, Tuesday, Wednesday etc</title>
      <link>https://community.jmp.com/t5/Discussions/Recode-numerical-days-into-Monday-Tuesday-Wednesday-etc/m-p/353237#M60259</link>
      <description>&lt;P&gt;Here is an example of a script that will create a new column with the desired values&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Create an Example data table
dt = New Table( "Example", add rows( 418 ), New Column( "weekday", set each value( Row() ) ) );

// Create a new column Using a script
dt &amp;lt;&amp;lt; New Column( "Weekday 2",
	character,
	set each value(
		theList = {"Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday"};
		theList[Mod( :weekday, 7 ) + 1];
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jan 2021 12:29:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recode-numerical-days-into-Monday-Tuesday-Wednesday-etc/m-p/353237#M60259</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-01-27T12:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Recode numerical days into Monday, Tuesday, Wednesday etc</title>
      <link>https://community.jmp.com/t5/Discussions/Recode-numerical-days-into-Monday-Tuesday-Wednesday-etc/m-p/353240#M60261</link>
      <description>Thank you so much. However, if I may ask, how do I do it, such that the new column is inside my existing table?&lt;BR /&gt;&lt;BR /&gt;For instance, my existing table name is transaction_data.&lt;BR /&gt;&lt;BR /&gt;Which are the field that I needed to change to "transaction_data" above, without the need to create a new table?</description>
      <pubDate>Wed, 27 Jan 2021 14:16:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recode-numerical-days-into-Monday-Tuesday-Wednesday-etc/m-p/353240#M60261</guid>
      <dc:creator>Madwolf</dc:creator>
      <dc:date>2021-01-27T14:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Recode numerical days into Monday, Tuesday, Wednesday etc</title>
      <link>https://community.jmp.com/t5/Discussions/Recode-numerical-days-into-Monday-Tuesday-Wednesday-etc/m-p/353243#M60263</link>
      <description>&lt;P&gt;Building on&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;'s solution, you can use a Formula column with the &lt;A href="https://www.jmp.com/support/help/en/15.2/#page/jmp/numeric-functions.shtml" target="_blank"&gt;Modulo()&lt;/A&gt; function that he showed, along with the &lt;A href="https://www.jmp.com/support/help/en/15.2/#page/jmp/properties-that-attach-information-to-column-values.shtml" target="_blank"&gt;Value Labels&lt;/A&gt; property.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-01-27_09-16-23.770.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29769iCF61BD5A3D22A453/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2021-01-27_09-16-23.770.png" alt="2021-01-27_09-16-23.770.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The attached data table has this example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 14:20:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recode-numerical-days-into-Monday-Tuesday-Wednesday-etc/m-p/353243#M60263</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2021-01-27T14:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Recode numerical days into Monday, Tuesday, Wednesday etc</title>
      <link>https://community.jmp.com/t5/Discussions/Recode-numerical-days-into-Monday-Tuesday-Wednesday-etc/m-p/353244#M60264</link>
      <description>&lt;P&gt;Select the column with the current values (1..7). Select Cols &amp;gt; Column Info. Select Column Properties &amp;gt; Value Labels. Define the character string label for each data value.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 14:20:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recode-numerical-days-into-Monday-Tuesday-Wednesday-etc/m-p/353244#M60264</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2021-01-27T14:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Recode numerical days into Monday, Tuesday, Wednesday etc</title>
      <link>https://community.jmp.com/t5/Discussions/Recode-numerical-days-into-Monday-Tuesday-Wednesday-etc/m-p/353246#M60266</link>
      <description>Thank you so much!!</description>
      <pubDate>Wed, 27 Jan 2021 14:28:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recode-numerical-days-into-Monday-Tuesday-Wednesday-etc/m-p/353246#M60266</guid>
      <dc:creator>Madwolf</dc:creator>
      <dc:date>2021-01-27T14:28:32Z</dc:date>
    </item>
  </channel>
</rss>

