# Quarto Document with Code Chunks

## Basic R Chunk

```{r}
#| echo: false
#| warning: true

x <- 1 + 1
print(x)
```

## Chunk with Figure Options

```{r}
#| fig-cap: "A nice plot"
#| fig-width: 7
#| fig-height: 5

plot(1:10, main="Test")
```

## Chunk with Label and Mixed Options

```{r, label=analysis-chunk, cache=my_cache_var}
#| echo: false
#| message: true

# This has a complex expression that stays inline
result <- analyze_data()
```

## Chunk with label

```{r}
#| label: mylabel
#| echo: false

summary(data)
```

## Chunk with Echo Expression

```{r, echo=1:2}
#| label: vMsim

x <- 1
a <- 2
b <- 3
```

```{r, echo=2}
x <- 1
a <- 2
b <- 3
```

```{r, echo=-2}
x <- 1
a <- 2
b <- 3
```

## Chunk with very long caption

```{r}
#| fig-cap: This is a very long caption that should be truncated in the output
#|   to ensure that it does not take up too much space in the rendered document.
#|   The caption continues with more details about the figure and its
#|   significance in the context of the analysis being performed.
```
