<?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: What is the easiest way to count the number of occurrences in a column when rows duplicate? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/What-is-the-easiest-way-to-count-the-number-of-occurrences-in-a/m-p/14405#M13452</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A super easy way of doing it quickly would be to use the recode function on the column... as part of the function it gives you the number of occurrences of each item in the column.&amp;nbsp; Another option using tabulate is to change the pull down under "Tabulate" from "Interactive Table" to Dialog... then you can just set it up as you would with any other JMP platform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Sep 2015 16:35:54 GMT</pubDate>
    <dc:creator>MikeD_Anderson</dc:creator>
    <dc:date>2015-09-23T16:35:54Z</dc:date>
    <item>
      <title>What is the easiest way to count the number of occurrences in a column when rows duplicate?</title>
      <link>https://community.jmp.com/t5/Discussions/What-is-the-easiest-way-to-count-the-number-of-occurrences-in-a/m-p/14403#M13450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the easiest way to count the number of occurrences in a column when rows duplicate based on another column?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can of course create a new table without duplicate rows or a script, but can this be done with say Tabulate?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: I want to know how many men and women.&amp;nbsp; F(n=3) and M(n=2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Person&amp;nbsp;&amp;nbsp;&amp;nbsp; Sex&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Jim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 20:10:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/What-is-the-easiest-way-to-count-the-number-of-occurrences-in-a/m-p/14403#M13450</guid>
      <dc:creator>mri</dc:creator>
      <dc:date>2015-09-22T20:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: What is the easiest way to count the number of occurrences in a column when rows duplicate?</title>
      <link>https://community.jmp.com/t5/Discussions/What-is-the-easiest-way-to-count-the-number-of-occurrences-in-a/m-p/14404#M13451</link>
      <description>&lt;P&gt;hi Jim&lt;/P&gt;
&lt;P&gt;you can do it with tabulate but i find it difficult to enplane in words the delicate positioning of the variables by drag and drop so here are two alternative scripts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// create a source data table
dt1 = New Table( "source data",
     Add Rows( 8 ),
     New Column( "Person",
          Numeric,
          Continuous,
          Format( "Best", 15 ),
          Set Values( [1, 2, 2, 3, 3, 4, 5, 5] )
     ),
     New Column( "Sex",
          Character( 16 ),
          Nominal,
          Set Values( {"F", "F", "F", "M", "M", "M", "F", "F"} )
     )
);
 
// option 1
Tabulate(
     Show Control Panel( 0 ),
     Add Table(
          Column Table( Analysis Columns( :Person ), Statistics( N Categories ) ),
          Row Table( Grouping Columns( :Sex ) )
     )
);
 
// option 2
Tabulate(
     Show Control Panel( 0 ),
     Add Table(
          Column Table( Statistics( N Categories ) ),
          Row Table( Grouping Columns( :Sex ), Analysis Columns( :Person ) )
     )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 20:10:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/What-is-the-easiest-way-to-count-the-number-of-occurrences-in-a/m-p/14404#M13451</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2018-06-21T20:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: What is the easiest way to count the number of occurrences in a column when rows duplicate?</title>
      <link>https://community.jmp.com/t5/Discussions/What-is-the-easiest-way-to-count-the-number-of-occurrences-in-a/m-p/14405#M13452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A super easy way of doing it quickly would be to use the recode function on the column... as part of the function it gives you the number of occurrences of each item in the column.&amp;nbsp; Another option using tabulate is to change the pull down under "Tabulate" from "Interactive Table" to Dialog... then you can just set it up as you would with any other JMP platform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 16:35:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/What-is-the-easiest-way-to-count-the-number-of-occurrences-in-a/m-p/14405#M13452</guid>
      <dc:creator>MikeD_Anderson</dc:creator>
      <dc:date>2015-09-23T16:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: What is the easiest way to count the number of occurrences in a column when rows duplicate?</title>
      <link>https://community.jmp.com/t5/Discussions/What-is-the-easiest-way-to-count-the-number-of-occurrences-in-a/m-p/14406#M13453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more simple way:&lt;/P&gt;&lt;P&gt;1. Select &lt;STRONG&gt;Tables&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Summary&lt;/STRONG&gt;. In the column dialog window, select Person and Sex and make them Group variables. (No Statistics columns needed here.) Click OK. This produces a table with no duplicate rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Person&lt;/TD&gt;&lt;TD&gt;Sex&lt;/TD&gt;&lt;TD&gt;N Rows&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;M&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;M&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Select &lt;STRONG&gt;Tables&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Summary&lt;/STRONG&gt; for this new table. In the column dialog window, just select Sex and make it a Group variable. Click OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Sex&lt;/TD&gt;&lt;TD&gt;N Rows&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;M&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Howard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 18:34:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/What-is-the-easiest-way-to-count-the-number-of-occurrences-in-a/m-p/14406#M13453</guid>
      <dc:creator>hlrauch</dc:creator>
      <dc:date>2015-09-23T18:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: What is the easiest way to count the number of occurrences in a column when rows duplicate?</title>
      <link>https://community.jmp.com/t5/Discussions/What-is-the-easiest-way-to-count-the-number-of-occurrences-in-a/m-p/14407#M13454</link>
      <description>&lt;P&gt;Like Mr. Anderson said, Recode is a real easy way.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a scripting method, this works quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;x = Associative Array(:Person, :Sex)&amp;lt;&amp;lt;Get Values;
M = nrows(loc(x, "M"));
F = nrows(loc(x, "F"));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 20:11:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/What-is-the-easiest-way-to-count-the-number-of-occurrences-in-a/m-p/14407#M13454</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2018-06-21T20:11:06Z</dc:date>
    </item>
  </channel>
</rss>

