I can't get your shiny reprex working because it refers to files on your computer. I'd simplify your question such that others can get it up and running quickly, and replicate the issue you're seeing.
The values displayed in the dropdown are defined by the choices
argument in the selectInput
function.
As an example
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
Values = c(5,25,50)
names(Values) = c("Value - 5", "Value - 25", "Valu - 50")
library(shiny)
# Define UI for application that draws a histogram
ui <- fluidPage(
# Application title
titlePanel("Old Faithful Geyser Data"),
# Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
selectInput("bins",
"Number of bins:",
choices = Values,
# choices = c("Value5" = 5,"Value25" = 25,"Value50" = 50)
)
),
# Show a plot of the generated distribution
mainPanel(
plotOutput("distPlot")
)
)
)
# Define server logic required to draw a histogram
server <- function(input, output) {
output$distPlot <- renderPlot({
# generate bins based on input$bins from ui.R
x <- faithful[, 2]
bins <- seq(min(x), max(x), length.out = as.numeric(input$bins) + 1)
# draw the histogram with the specified number of bins
hist(x, breaks = bins, col = 'darkgray', border = 'white')
})
}
# Run the application
shinyApp(ui = ui, server = server)