0

I'm writing a webpage on using quarto and I want to include code blocks, with the code attributes, for example:

```{r}
#| eval: false
teacher_df %>% 
  head(3)
```

but when I write this in a webpage it appears as so:

teacher_df %>% 
  head(3)
pluke
  • 3,832
  • 5
  • 45
  • 68

1 Answers1

2

Try:

````markdown
`r ''````{r tables-mtcars}
knitr::kable(iris[1:5, ], caption = 'A caption')
```
````
Grzegorz Sapijaszko
  • 1,913
  • 1
  • 5
  • 12
  • @eglease, please remove your edit, it's wrong. It's very important to see the code with at least 4x \` prior to r chunk. Otherwise the edited by you answer doesn't make sense. And \`\`\` markdown doesn't hurt. – Grzegorz Sapijaszko Jul 04 '23 at 18:06
  • Done. Sorry about that. It looked like bad formatting during the review. – eglease Jul 04 '23 at 19:37