How can I get R chunk code to produce the same number of digits as r inline code in RStudio RMarkdown file?
For example:
```{r}
x=1:30
sigma.sq=sum((x-mean(x))^2)/30
sigma.sq
```
Thus, $\sigma^2=`r sigma.sq`$.
The chunk produces the number 74.92, but the inline code produces the number 74.9167. I'd like both to be the same.
Suggestions?
D.
P.S. Here's a screen shot of what the above code produces.