I would like to read a .yaml file to get yaml parameters for a Rmarkdown report. Original I have a yaml header to define a vector.
---
params:
ids: !r c(2455, 2490)
---
and it works, where params$ids is a vector.
However, if I put ids: !r c(2455, 2490) into a report_params.yaml file, and read that yaml file by
report_params <- yaml::read_yaml("report_params.yaml")
now report_params$ids is a string 'c(2455, 2490)'.
so what did I miss, and how should I fix this?