I have a .qmd / .rmd file that wants to show the output of block of code. The code block has a lot of lines at the beginning that I'd like to hide, in the example below I'd like the output to be the third line of code str(month)
and output the result of str(month)
. I've attempted to edit the code block parameters, but it's giving me an error:
---
format:
html: default
---
```{r}
#| echo: c(3)
month <- "July"
str(month)
```
Error:
7: #| echo: c(3)
~~~
8: month <- "July"
x The value c(3) is string.
i The error happened in location echo.
rmarkdown support files suggest something like this might be possible