### Bug description

It is [documented](https://quarto.org/docs/computations/r.html#chunk-options) that `!expr` works with `fig-cap`, but it doesn't work with `fig-subcap`.

````md
```{r}
#| label: fig-charts
#| fig-cap: Charts
#| fig-subcap: !expr c("First", "Second")

plot(cars)
plot(pressure)
```
````

I get the following error when running `quarto render` on the file:

```
ERROR: Validation of YAML cell metadata failed.
In file subfig-eval-yaml.qmd
(line 4, columns 16--42) Key fig-subcap has value !expr c("First", "Second"), which must be 'true'
3: #| fig-cap: Charts
4: #| fig-subcap: !expr c("First", "Second")
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~

ERROR: Render failed due to invalid YAML.
```

### `quarto check` Output

```
[>] Checking Quarto installation......OK
      Version: 1.0.38
      Path: C:\scoop\apps\quarto\current\bin\
      CodePage: 1250

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.10.6
      Path: C:/msys64/mingw64/bin/python.exe
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python -m pip install jupyter

[>] Checking R installation...........OK
      Version: 4.2.1
      Path: C:/scoop/apps/r-release/current
      LibPaths:
        - C:/scoop/apps/r-release/4.2.1/library
      rmarkdown: 2.15

[>] Checking Knitr engine render......OK
```

### `quarto tools check` Output

```
[>] Inspecting tools

Tool         Status                    Installed     Latest  
chromium     Not installed             ---           869685  
tinytex      External Installation     ---           v2022.08
```

### Checklist

- [X] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [X] included a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] documented the quarto version you're running, by pasting the output from running `quarto check` in the "Quarto Check Output" text area?
- [X] documented the version of the quarto tools you're running, by providing the output from running `quarto tools check` in the "Quarto Tools Check Output" text area?
- [X] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- [X] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
2022-08-22T15:25:06Z
svraka
bug yaml-validation
Future
open
Evaluating R code with `!expr` in `fig-subcap` doesn't work
https://github.com/quarto-dev/quarto-cli/issues/2047