title: Is there a way to use results of r code in embedded LaTeX equations in R Markdown
body: <p>Is there a command like <code>\Sexpr</code> that can be used inside embedded LaTeX equations in R Markdown documents? I would like to form the equation of a simple linear regression using something like this:</p>
  
  <pre><code>$\hat{Y}= \Sexpr{coef(model)[[1]]} + \Sexpr{coef(model)[[2]]} \cdot Length$
  </code></pre>