I want to subset a data frame based on userinput
...
df <- eventReactive(input$button,{
df2 <- read.csv(foo(), sep = ";")
df2$date <- as.Date.character(df2$date, format = '%d.%m.%Y')
#input$Main2 element of (a,b,c)
input1<- input$Main2
#Does not work:
df3 <- subset(df2, input1 %in% input$Main2_1)
#Works:
df3 <- subset(df2, a %in% input$Main2_1)
df3
})
....
Where input1 is a single variable name. It works fine if I directly write the variable name instead of input1.