Reputation: 4299
I was wondering if it was possible to embed a R markdown
result directly in a sentence as follows:
Let us imagine that this is my R markdown
file
---
title: "R markdown is great"
author: "Giacomo"
date: "15 Oct 2015"
output: pdf_document
---
The mean number of `disp` is
```{r}
mean(mtcars$disp)
```
and the ...
So I get
Is it possible to produce something like
Upvotes: 2
Views: 1629
Reputation: 17359
This Rmarkdown reference guide shows how this can be done: https://www.rstudio.com/wp-content/uploads/2015/03/rmarkdown-reference.pdf
The mean number of disp
is `r mean(disp)`
.
Upvotes: 4