title: How to fit regression line to plot in R?
body: <p>So I have this plot that looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/b98e3.png" alt="enter image description here"></p>
  
  <p>Both the x and y axis are log, how do I fit a least squares regression line to this? This is what I used to plot the graph:     plot(log(counts),log="x",type="p")</p>
  
  <p>counts contains the number of observations of each x...</p>