I have this basic brilliant application and it blazes quickly in the Viewer, but when I use the Open in Browser option, it takes some time to select the input.
selectList <- sapply(1:15000, function(x) paste(sample(letters, 10), collapse = ''))
ui <- fluidPage(
selectInput('mylist', 'Select Something',
choices = c(Choose = '', selectList),
selected = 1)
)
server <- function(input, output) {
}
shinyApp(ui = ui, server = server)
According to this topic - https://groups.google.com/forum/#!topic/shiny-discuss/doHpFM6ZOGg , the problem has been fixed in the old branch. The last installation I use is this, and I see the problem of slowness.
packageVersion('shiny')
[1] ‘0.13.2’
Any parameters I have to do behave differently?
Additional need:
, . - . , ?
selectList1 <- sapply(1:15000, function(x) paste0(x, "_", paste(sample(LETTERS, 10), collapse = '')))
selectList2 <- sapply(1:15000, function(x) paste0(x, "_", paste(sample(letters, 10), collapse = '')))
# ui
ui <- fluidPage(
selectizeInput(
inputId = 'mylist', label = 'Select Something',
choices = NULL,
selected = 1
),
radioButtons('letterType',
'Select a Letter Type:',
choices = c('Upper Case' = 'upper',
'Lower Case' = 'lower'),
selected = 'upper',
inline = TRUE)
)
# server
server <- function(input, output, session) {
selectListReactive <- reactive({
validate(need(is.null(input$letterType), FALSE))
if (input$letterType == 'upper')
selectList1
else
selectList2
})
observeEvent(input$letterType, {
updateSelectizeInput(session = session, inputId = 'mylist',
choices = c(Choose = '', selectListReactive()),
server = TRUE)
})
}
shinyApp(ui = ui, server = server)