<?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: Command to get number of identical entries in a list in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Command-to-get-number-of-identical-entries-in-a-list/m-p/444696#M69267</link>
    <description>&lt;P&gt;Ok, This works. So I have to convert a list to a Matrix.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Dec 2021 20:38:51 GMT</pubDate>
    <dc:creator>Neo</dc:creator>
    <dc:date>2021-12-13T20:38:51Z</dc:date>
    <item>
      <title>Command to get number of identical entries in a list</title>
      <link>https://community.jmp.com/t5/Discussions/Command-to-get-number-of-identical-entries-in-a-list/m-p/444675#M69264</link>
      <description>&lt;P&gt;I have a list from which I want to get the number of times 0's (and 1's) appear in it.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;m = {0, 0, 0, 0, 0, 0, 0, 1, 1, 1};&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nzeros = N Items (m) &amp;lt;1; show (nzeros);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;does not seem to work to get the number of times &lt;EM&gt;0&lt;/EM&gt; appear in &lt;EM&gt;m.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;(I get nzeros = 0)&lt;/P&gt;&lt;P&gt;What is the correct way to get the number of times an identical entry appears on a list (I am on JMP 13)?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:07:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Command-to-get-number-of-identical-entries-in-a-list/m-p/444675#M69264</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-06-09T18:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Command to get number of identical entries in a list</title>
      <link>https://community.jmp.com/t5/Discussions/Command-to-get-number-of-identical-entries-in-a-list/m-p/444694#M69265</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

m = {0, 0, 0, 0, 0, 0, 0, 1, 1, 1};

mm = Matrix( m );

nZeros = Sum( mm == 0 );
nOnes  = Sum( mm == 1 );

Show( nZeros, nOnes );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Dec 2021 20:26:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Command-to-get-number-of-identical-entries-in-a-list/m-p/444694#M69265</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2021-12-13T20:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Command to get number of identical entries in a list</title>
      <link>https://community.jmp.com/t5/Discussions/Command-to-get-number-of-identical-entries-in-a-list/m-p/444696#M69267</link>
      <description>&lt;P&gt;Ok, This works. So I have to convert a list to a Matrix.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 20:38:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Command-to-get-number-of-identical-entries-in-a-list/m-p/444696#M69267</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2021-12-13T20:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Command to get number of identical entries in a list</title>
      <link>https://community.jmp.com/t5/Discussions/Command-to-get-number-of-identical-entries-in-a-list/m-p/444767#M69272</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/28235"&gt;@Neo&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;you can try this as well:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

m = {0, 0, 0, 0, 0, 0, 0, 1, 1, 1};
nZeros = n items (loc(m, 0));
nOnes = n items (loc (m, 1));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;no conversion to matrix but i do not see any advantage in this case.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 00:46:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Command-to-get-number-of-identical-entries-in-a-list/m-p/444767#M69272</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2021-12-14T00:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Command to get number of identical entries in a list</title>
      <link>https://community.jmp.com/t5/Discussions/Command-to-get-number-of-identical-entries-in-a-list/m-p/445138#M69310</link>
      <description>&lt;P&gt;If it's really zeros and ones, couldn't you just sum for the ones?&amp;nbsp;&amp;nbsp;&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);
m = {0, 0, 0, 0, 0, 0, 0, 1, 1, 1};
n_ones = sum(m);
n_zeros = nitems(m)-n_ones;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Though the other two are probably better in general.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 00:31:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Command-to-get-number-of-identical-entries-in-a-list/m-p/445138#M69310</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2021-12-15T00:31:12Z</dc:date>
    </item>
  </channel>
</rss>

