1

After following suggestions there I was able to select imported columns by my own:

Shiny How to dynamically select columns of imported dataset for further analysis

But I was wondering if there is an option to remove a particular column from selected. I mean, for example, I chose column by mistake and I do not want to display this column, can I remove it somehow before updating a dataframe? So basically i would like to know if there is a way to unselect options in selectInput?

magruc
  • 165
  • 1
  • 11

1 Answers1

2

If I'm understanding your question correctly, it's from the perspective of the user of your app, not the person writing it. You want your users to be able to de-select items after they select them in your selectInput. This is of course supported.

How users do this depends on whether you use selectize = TRUE or not in your selectInput. The default is TRUE.

If you use selectize, the user can just move the I-beam cursor before the item and press delete, or after it and press backspace.

If you don't use selectize, users can just click an item to deselect it.

If you want, you could use a Confirm button to have the user confirm that their selection is correct and complete before anything reactive updates.

Mike Stanley
  • 1,420
  • 11
  • 13