I would like to create a custom YAML
with the as.yaml
function. Somehow it convert the TRUE/FALSE values to yes/no. Here is some reproducible code:
library(yaml)
x <- list(test = list(a = TRUE))
yaml <- as.yaml(x)
cat(yaml, sep = "n")
#> test:
#> a: yes
As you can see the TRUE value is now yes in the yaml. If we use “TRUE” instead of TRUE it is converted to “TRUE” but I don’t want it to be in quotes. My expected output looks like this:
test:
a: TRUE
So I was wondering if anyone knows why this happens and how to fix this?
Recognized by R Language Collective
1