title: How do I count the largest number of unique entries in a single day in R?
body: <p>I have some data from a Whatsapp chat export which looks like this:</p>
  <pre><code>time                 author             text               day     times     timeblock  dayblock
  2019-08-02 12:16:40|&quot;a65c9c3a&quot;|&quot;This message was deleted&quot;  |2|   &quot;12:16:40&quot;| &quot;Cycle 1&quot;|  &quot;No&quot;
  2019-08-02 12:36:40|&quot;ab5c9c0a&quot;|&quot;Please take a survey&quot;      |2|   &quot;12:36:40&quot;| &quot;Cycle 1&quot;|  &quot;No&quot;
  2019-08-02 13:29:40|&quot;43cd8b94&quot;|&quot;Done :D&quot;                   |2|   &quot;13:29:40&quot;| &quot;Cycle 1&quot;|  &quot;No&quot;
  2019-08-02 17:41:40|&quot;083fa508&quot;|&quot;&lt;Media omitted&gt;&quot;           |2|   &quot;17:41:40&quot;| &quot;Cycle 1&quot;|  &quot;No&quot;
  
  
  str(chat)
  
  Classes ‘data.table’ and 'data.frame':  16111 obs. of  7 variables:
   $ time     : POSIXct, format: &quot;2019-08-02 12:16:40&quot; &quot;2019-08-02 12:35:40&quot; &quot;2019-08-02 12:36:40&quot; ...
   $ author   : chr  &quot;ab5c9c0a&quot; &quot;ab5c9c0a&quot; &quot;ab5c9c0a&quot; &quot;43cd8b94&quot; ...
   $ text     : chr  &quot;This message was deleted&quot; &quot;https://docs.google.com/forms/d/e/1FAIpQLSf4hE&quot; &quot;Please take a survey&quot; &quot;Done :D&quot; ...
   $ day      : int  2 2 2 2 2 3 3 3 3 3 ...
   $ times    : chr  &quot;12:16:40&quot; &quot;12:35:40&quot; &quot;12:36:40&quot; &quot;13:29:40&quot; ...
   $ timeblock: Factor w/ 13 levels &quot;Cycle 1&quot;,&quot;Cycle 2&quot;,..:
  </code></pre>
  <p>What I wanted to try and see was on which single date did we encounter the largest number of unique authors, i.e, what topic were we talking about when the largest number of people had something to say.</p>
  <p>Additionally, what I am also interested in seeing the opposite, and find out when date/time when only 4-5 <code>author</code>s produced most <code>text</code>.</p>
  <p>I don't know how to proceed with this but I tried doing</p>
  <pre><code>chat %&gt;% group_by(author, date) %&gt;% count(date)
  </code></pre>
  <p>which I thought would count the individual dates which could be sorted, but this doesn't do that.</p>
  <p>How can I do this?</p>
  <pre><code>This is what the sample looks like: 
  
                     time   author
   1: 2019-08-02 12:16:17 ab5c9c0a
   2: 2019-08-02 12:35:17 ab5c9c0a
   3: 2019-08-02 12:36:17 ab5c9c0a
   4: 2019-08-02 13:29:17 43cd8b94
   5: 2019-08-02 17:41:17 083fa508
   6: 2019-08-03 15:02:17 58d48a3a
   7: 2019-08-03 15:02:17 58d48a3a
   8: 2020-12-08 10:49:17 baf8b772
   9: 2020-12-09 09:59:17 6ee68966
  10: 2020-12-09 14:43:17 9c342ce5
                                                                                                                 text
   1:                                                                                        This message was deleted
   2:                                                                  https://docs.google.com/forms/d/e/-p-/viewform?usp=sf_link
   3:                                                                                            Please take a survey
   4:                                                                                                         Done :D
   5:                                                                                                 &lt;Media omitted&gt;
   6:                                                                                                 &lt;Media omitted&gt;
   7:                                                                             This guy was caught
   8:                                                                                     ^information overload class
   9:                                               People from class do y'all know where class is?
  10:  Mobile Class\nFollow this link to join the WhatsApp group:
       day    times       date timeblock dayblock
   1:   2 12:16:17 2019-08-02   Cycle 1    12 PM
   2:   2 12:35:17 2019-08-02   Cycle 1    12 PM
   3:   2 12:36:17 2019-08-02   Cycle 1    12 PM
   4:   2 13:29:17 2019-08-02   Cycle 1    01 PM
   5:   2 17:41:17 2019-08-02   Cycle 1    05 PM
   6:   3 15:02:17 2019-08-03   Cycle 1    03 PM
   7:   3 15:02:17 2019-08-03   Cycle 1    03 PM
   8:   8 10:49:17 2020-12-08  No Event    10 AM
   9:   9 09:59:17 2020-12-09  No Event    09 AM
  10:   9 14:43:17 2020-12-09  No Event    02 PM
  </code></pre>