First, in the subset
call you can skip out test$
(not the cause of your problem):
subset(test, MARKET==var)
I suspect your problem is that var
is not a string, it is the output of reactive
. Try getting the value with var()
instead of var
subset(test, MARKET==var())