title: How to plot trend line with regression equation in R?
body: <p>My data is like this</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">Date</th>
  <th style="text-align: center;">Speed</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">1/2019</td>
  <td style="text-align: center;">4500</td>
  </tr>
  <tr>
  <td style="text-align: center;">2/2019</td>
  <td style="text-align: center;">3400</td>
  </tr>
  <tr>
  <td style="text-align: center;">3/2019</td>
  <td style="text-align: center;">5300</td>
  </tr>
  <tr>
  <td style="text-align: center;">4/2019</td>
  <td style="text-align: center;">2000</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>The date is my independent variable and Speed is my Dependent variable.</p>
  <p>I'm trying to plot the trend line with a regression equation to understand if there is an increasing trend or decreasing trend.</p>
  <p>I try to use this code but it did not show the equation in the graph.</p>
  <pre><code>ggscatter(a, x = &quot;Date&quot;, y = &quot;Speed&quot;, add = &quot;reg.line&quot;) +
  stat_cor(label.x = 03/2019, label.y = 3700) +
  stat_regline_equation(label.x = 03/2019, label.y = 3600)
  #&gt; `geom_smooth()` using formula 'y ~ x'
  </code></pre>
  <p>Example output that I want (the Correlation Equation and the Regression Equation)
  <a href="https://i.stack.imgur.com/4mMH7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4mMH7.png" alt="Sample Output" /></a></p>