title: How to get the lowest value per interval in R
body: <p>I have data in the zoo format in the following structure</p>
  <pre><code>date           val
  2020-11-01     3244
  2020-11-02     3273
  2020-11-03     2974
  2020-11-04     3283
  2020-11-05     3922
  2020-11-06     3669
  2020-11-07     4246
  2020-11-08     4594
  2020-11-09     4086
  2020-11-10     4302
  2020-11-11     4559
  2020-11-12     4981
  2020-11-13     4741
  2020-11-14     5267
  
  
  </code></pre>
  <p>that I am trying to get into this form</p>
  <pre><code>    date           val
  Mon 2020-11-01     3244
  Tue 2020-11-02     3273
  Wed 2020-11-03     2974
  Thu 2020-11-04     3283
  Fri 2020-11-05     3922
  Sat 2020-11-06     3669
  Sun 2020-11-07     4246
  Mon 2020-11-08     4594
  Tue 2020-11-09     4086
  Wed 2020-11-10     4302
  Thu 2020-11-11     4559
  Fri 2020-11-12     4981
  Sat 2020-11-13     4741
  Sun 2020-11-14     5267
  </code></pre>
  <p>In order to count the number of time I observe the smallest of the values per week.</p>
  <pre><code>Mon = 1
  Tue = 1
  Wed = 0
  Thu = 0
  Fri = 0
  Sat = 0
  Sun = 0
  </code></pre>
  <p>I tried to let the data in the flat format before adding the date with zoo and added the weekdays but failed to count with it. Does anyone know an easier way to do it? I am open to visual solutions</p>