<?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: JMP script: If N categories &amp;gt; 5 script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JMP-script-If-N-categories-gt-5-script/m-p/477896#M72242</link>
    <description>&lt;P&gt;You will have to first get a list of possible categories before using N Items. One fairly simple one is using associative array:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
If(N Items(Associative Array(:age)) &amp;gt; 5,
	show(N Items(Associative Array(:age)));
	show("if");
,
	show(N Items(Associative Array(:age)));
	show("else");
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 11 Apr 2022 12:51:33 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-04-11T12:51:33Z</dc:date>
    <item>
      <title>JMP script: If N categories &gt; 5 script</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-script-If-N-categories-gt-5-script/m-p/477877#M72241</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I would like to create a condition in case there is more than 5 categories in my variable (column), and then the rest of my script is ran.&lt;/P&gt;&lt;P&gt;I think the "n items" function is the one I need:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(N items(:Y1)&amp;gt;5,	&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it doesn't work and I received a error saying: bar argument (:Y)...&lt;/P&gt;&lt;P&gt;Please someone can help me?&lt;/P&gt;&lt;P&gt;Sebastien&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:56:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-script-If-N-categories-gt-5-script/m-p/477877#M72241</guid>
      <dc:creator>Sebastienlg</dc:creator>
      <dc:date>2023-06-09T16:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: JMP script: If N categories &gt; 5 script</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-script-If-N-categories-gt-5-script/m-p/477896#M72242</link>
      <description>&lt;P&gt;You will have to first get a list of possible categories before using N Items. One fairly simple one is using associative array:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
If(N Items(Associative Array(:age)) &amp;gt; 5,
	show(N Items(Associative Array(:age)));
	show("if");
,
	show(N Items(Associative Array(:age)));
	show("else");
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Apr 2022 12:51:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-script-If-N-categories-gt-5-script/m-p/477896#M72242</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-04-11T12:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: JMP script: If N categories &gt; 5 script</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-script-If-N-categories-gt-5-script/m-p/478599#M72281</link>
      <description>&lt;P&gt;That is exactly that I wanted!&lt;/P&gt;&lt;P&gt;Thank's a lot for your answer.&lt;/P&gt;&lt;P&gt;Sebastien&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 13:38:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-script-If-N-categories-gt-5-script/m-p/478599#M72281</guid>
      <dc:creator>Sebastienlg</dc:creator>
      <dc:date>2022-04-12T13:38:02Z</dc:date>
    </item>
  </channel>
</rss>

