if statement get rid of: Error in if: argument is of length zero
问题 The idea Depending on selectizeInput() input I want to display one row of data from a data frame. However, some variables are only to be displayed if their value is not FALSE . selectizeInput() includes a placeholder prompt, which is highly desirable. The problem The code I developed actually works but until any option is selected displays Error in if: argument is of length zero inside the app, which is highly undesirable. Example code library("shiny") # simulate data data <- data.frame( name