2

I’m writing a Quarto document and trying to deliberately trigger an error in R for demonstration purposes. I’ve noticed that it works as expected until I place it inside a callout block.

I am just wondering why does this happen, and how can I get it to work within a callout?

---
title: "Example"
format: 
  html:
    embed-resources: true
---

Create an example data frame:

```{r}
deck <- data.frame(face  = c("king", "queen", "jack"), 
                   value = 13:11)
```



:::{.callout-danger}

R will return an error if you try to pair a negative integer with a positive integer in the same index:

```{r}
#| error: true

deck[c(1, -1), ]
```

:::

1
  • 2
    It works as expected for me both in and out of a callout block, see ibb.co/B2BSMf9D. Note: I used :::{.callout-warning}, here it says "Note that there are five types of callouts, including: note, tip, warning, caution, and important.". quarto: 1.5.57, rmarkdown: 2.29, knitr: 1.48. Commented Aug 7 at 11:44

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.