Consider the following code, the data below is only sample of the complete data set. In actual all these data a data.frames.
#Input data
x = c(70407, 70407, 10977, 10977, 70668, 70450, 70276, 70450, 20820,"L06G1", "L06AP",20820, 70450, 70450, 70450, 70190, 70450)
#Shiny ui.R
selectInput(inputId = "z",label = "PN",choices = unique(x),multiple = TRUE,selected = "")
#if else statement in server.R
y = if(is.null(input$z)) as.vector(unique(x)) else input$z
My concern is even if select specific value for z , output y instead of being z , is showing unique(x).
All data types are same, character.
Is there a better solution in dplyr ?