title: max function for the current time
body: <p>How do I create a column with the current high of the day following the time? I used pmax but it wasn't helpful.</p>
  
  <pre><code>&gt; df
               date_time  Price
  1 2018-02-01 18:13:17 3178.5
  2 2018-02-01 18:13:13 3179.0
  3 2018-02-01 18:13:13 3178.5
  4 2018-02-01 18:13:13 3178.5
  5 2018-02-01 18:13:09 3178.5
  6 2018-02-01 18:13:00 3178.5
  7 2018-02-01 18:12:54 3179.5
  8 2018-02-01 18:12:43 3179.5
  </code></pre>
  
  <p>I'm trying to do this.</p>
  
  <pre><code>&gt; mutate(df, high_day = ?)
              date_time  Price high_day
  1 2018-02-01 18:13:17 3179.5   3179.5
  2 2018-02-01 18:13:13 3179.0   3179.0
  3 2018-02-01 18:13:13 3178.5   3179.0
  4 2018-02-01 18:13:13 3179.0   3179.0
  5 2018-02-01 18:13:09 3178.5   3178.5
  6 2018-02-01 18:13:00 3178.5   3178.5
  7 2018-02-01 18:12:54 3178.5   3178.5
  8 2018-02-01 18:12:43 3178.5   3178.5
  </code></pre>
  
  <p>for reproduction:</p>
  
  <pre><code>structure(list(data_hora = structure(c(1517508797, 1517508793, 
  1517508793, 1517508793, 1517508789, 1517508780, 1517508774, 1517508763, 
  1517508763, 1517508763, 1517508763, 1517508757, 1517508756), class = c("POSIXct", 
  "POSIXt"), tzone = ""), Preco = c(3178.5, 3179, 3178.5, 3178.5, 
  3178.5, 3178.5, 3179.5, 3179.5, 3179.5, 3179.5, 3179, 3179, 3179.5
  )), row.names = 38:50, class = "data.frame")
  </code></pre>