+1 for RMarkdown and editR. The best thing about RMarkdown is the ability to do calculations in R and use those variables within LaTeX. A simple example:
```{r}
a = 3
b = 6
c = a / b
```
Did you know that $\frac{`r a`}{`r b`} = `r c`$?
http://i.imgur.com/IpiqDEx.png