<?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 Recode using if and count functions in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Recode-using-if-and-count-functions/m-p/369453#M61915</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am relatively new to JMP and I am struggling to combine different functions using recoding functions and I&amp;nbsp;would appreciate your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a date table with one column containing plate numbers. Each Plate ID has a repetitive set of Names T0X, T0Y and T0Z associated. Now I want to recode X, Y and Z into numbers, starting from X =1, Y = 2 and Z = 3, and going on in steps of three (X = 4, Y = 5, Z = 6....).&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 23:27:27 GMT</pubDate>
    <dc:creator>AGB</dc:creator>
    <dc:date>2023-06-10T23:27:27Z</dc:date>
    <item>
      <title>Recode using if and count functions</title>
      <link>https://community.jmp.com/t5/Discussions/Recode-using-if-and-count-functions/m-p/369453#M61915</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am relatively new to JMP and I am struggling to combine different functions using recoding functions and I&amp;nbsp;would appreciate your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a date table with one column containing plate numbers. Each Plate ID has a repetitive set of Names T0X, T0Y and T0Z associated. Now I want to recode X, Y and Z into numbers, starting from X =1, Y = 2 and Z = 3, and going on in steps of three (X = 4, Y = 5, Z = 6....).&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:27:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recode-using-if-and-count-functions/m-p/369453#M61915</guid>
      <dc:creator>AGB</dc:creator>
      <dc:date>2023-06-10T23:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Recode using if and count functions</title>
      <link>https://community.jmp.com/t5/Discussions/Recode-using-if-and-count-functions/m-p/369492#M61916</link>
      <description>&lt;P&gt;Maybe this could work as starting point?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Test_Recode",
	Add Rows(9),
	Compress File When Saved(1),
	New Column("Plate",
		Numeric,
		"Continuous",
		Format("Best", 15),
		Set Values([1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4]),
		Set Display Width(48)
	),
	New Column("Name",
		Character(3),
		"Nominal",
		Set Values({"T0X", "T0Y", "T0Z", "T0X", "T0Y", "T0Z", "T0X", "T0Y", "T0Z", "T0X", "T0Y", "T0Z"}),
		Set Display Width(48)
	),
	New Column("Recode Output",
		Character(3),
		"Nominal",
		Set Values({"T01", "T02", "T03", "T04", "T05", "T06", "T07", "T08", "T09"}),
		Set Display Width(95)
	)
);
dt &amp;lt;&amp;lt; new column("test", Character, &amp;lt;&amp;lt; Formula(
"T" || 
If((:Plate-1)*3 &amp;lt; 9, "0", "") || 
Char(Match(Right(:Name, 1),
	"X", 1,
	"Y", 2,
	"Z", 3
) + (:Plate-1)*3)));

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Mar 2021 07:51:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recode-using-if-and-count-functions/m-p/369492#M61916</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-03-19T07:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Recode using if and count functions</title>
      <link>https://community.jmp.com/t5/Discussions/Recode-using-if-and-count-functions/m-p/369530#M61919</link>
      <description>This is awesome, thanks for the fast response!</description>
      <pubDate>Fri, 19 Mar 2021 09:33:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Recode-using-if-and-count-functions/m-p/369530#M61919</guid>
      <dc:creator>AGB</dc:creator>
      <dc:date>2021-03-19T09:33:53Z</dc:date>
    </item>
  </channel>
</rss>

