I'm using shiny to pass a large number of parameters to an rmarkdown document. This is successful, but my parameter declaration section just keeps getting longer and longer as more parameters are added.
Is there a way to simplify the declaration of parameters?
Example, I pass parameters A-Z to the rmarkdown document, right now I would write parameters in rmarkdown as:
---
title: "TEST"
params:
A: NA
B: NA
C: NA
And so on until Z
output: word_document
---
This works for a small number of parameters, but I'm going to passing along 400 parameters, and feel like there should be an easier way handle a large quantity without writing line by line.
Desired output, something like:
---
title: "TEST"
params:
lapply(LETTERS[1:26], function(x){paste(x,": NA")})
output: word_document
---
When I search on stack or just a general net search, all examples of parameters seem to do it just one by one: https://rmarkdown.rstudio.com/lesson-6.html
Thanks!