The YAML header allows us to set parameters using the
choices variables. However, it seems that we can only choose one value from the
choices list. Is there a way to select multiple (and hence to have a multi-item vector parameter)? For example, in each analysis report, I would like to compare two fruits (apple vs orange, apple vs pear, etc).
Since I don't know of a way to multi-select from
choices, I tried:
params: fruits: value: !r c("apple","orange") choices: - !r c("apple","orange") - !r c("apple","pear") - !r c("pear","orange")
But I got this error " The following parameters cannot be customized: fruits". So I don't even get the choices list to choose from. But it actually works for the default value if I ignore the error and click "Knit".