Parameterised R Markdown - multiple values in free text input

Hi - my question is basically the same as this one, in that I am looking to select multiple inputs in the R Markdown parameters. The difference is I want to do it in a free text field, not a drop-down list. I can't find anything online about how to do this - doing it with a single text input is fine, but I can't figure out how to do it with more than one. Here's some code - this works fine if we free-type "setosa", "virginica" or "versicolor" in the parameter field. I want to type in multiple, so "setosa, virginica" and it will return both

---
title: "rmd tester"
output: html_document
params: 
  flower:
      label: flower
      input: text
      value: setosa
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
data <- iris[c(1, 3, 56, 57, 150, 149), ]
data

Filtered:

data[data$Species %in% list(params$flower), ]

just fyi, using dropdown lists is not an option for me, this parameter will be used for unique identifier fields which will filter on a field of up to 10m unique records - so it has to be free text

thanks!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.