While using a single level list/dictionary for parameterizing an rmarkdown
document works:
---
params:
first_level: ~
---
```{r}
params
```
and knitting returns the expected
## $first_level
## NULL
I'm unable to use multi-level list/dictionaries as knitting
---
params:
first_level:
second_level: ~
---
```{r}
params
```
produces Error: no value field specified for YAML parameter 'first_level'
Execution halted
, where I would expect
## $first_level
## $first_level$second_level
## NULL
Is there really only a single level list supported or what am I screwing up?
As I commented below, the expected output can be achieved using
---
params:
first_level: !r list(second_level = NULL)
---
```{r}
params
```
But why use yaml
then at all in place of a parametrizing code block?