Reputation: 1013
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)
Upvotes: 2
Views: 460
Reputation: 41367
You could use a different notation r
instead of {r}
like this:
---
title: "Untitled"
---
```{r}
radius <- 2
```
The radius is `r radius`
Output:
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.
Upvotes: 2