Skip to content

Character object in R as parameter should stays parameter (especially 029 case) #242

@cderv

Description

@cderv

From

---
title: "Params"
format: markdown
params:
  number: null
---

```{r}
print(params$number)
```
quarto::quarto_render("param.qmd", execute_params = list(number = "029"))

This would print number as explained in the upstream issue. The solution is to pass quotes because this is 1.2 spec used in Quarto.

quarto render param.qmd -P number:'"029"'

and in YAML file it should be

number: '029'

However, this is not written like than by the R package because write_yaml() will do YAML v1.1 spec.

Doing

quarto::quarto_render("index.qmd", execute_params = list(number = "'029'"))

will not work because the YAML written is

number: '''029'''

We need to handle this case specifically in an handler, or just quote all the character type from R to yaml conversion 🤔

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions