Why is quarto not rendering in-line code?

23 views Asked by At

If I use in-line code in a Quarto document, after rendering the code is displayed as-is and not evaluated. Here the code in the file "mytest.qmd":

---
title: "Untitled"
---


```{r}
radius <- 2
```

The radius is `{r} radius`

Information on my system

RStudio Version
--------------------------------------------------
2023.12.1+402


Session Information
--------------------------------------------------
R version 4.3.3 (2024-02-29 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22635)
1

There are 1 answers

1
Quinten On BEST ANSWER

You could use a different notation r instead of {r} like this:

---
title: "Untitled"
---


```{r}
radius <- 2
```

The radius is `r radius`

Output:

enter image description here

Quarto v1.4

With the latest version of Quarto you can use the notation in your example like this:

---
title: "Untitled"
---


```{r}
radius <- 2
```

The radius is `{r} radius`

You probably need to upgrade your Quarto version.