简体   繁体   中英

Unselect columns of imported dataset - selectInput - Shiny

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM