c - Issue with a drop down in R shiny -



c - Issue with a drop down in R shiny -

i in process of building dashboard in r shiny. want user able select list of experiments live, alter on time. hence has called dataframe (or similar) generated code each day lists start , stop.

i have current code below, provides number rather name, assume reference name, cannot understand how displaying name. when utilize list code not run states must individually list each item, (assuming 1 works below user type.

testids dataframe 45 obs. of 1 variable.

any ideas on how resolve this?

thanks in advance

library("shiny")

shinyui( pagewithsidebar( headerpanel("draft dash"), # sidebar filters test types

sidebarpanel( selectinput("test", "experiment name:", c(testids) ), selectinput("user", "user type:", list("all users" = "all", "known users" = "kn", "unknown users" = "un", "new users" = "nw", "existing users" = "ex")),

as far can tell, selectinput("test", "experiment name:", c(testids) ) show entries of dataframe testids instead of column names, think want. utilize names(dataframe) populate selectinput list column names.

server <- function(input, output) { output$distplot <- renderplot({ hist(mtcars[,input$select], col = 'darkgray', border = 'white') }) } ui <- shinyui(fluidpage( sidebarlayout( sidebarpanel( selectinput('select', 'selection:', names(mtcars)), selectinput("user", "user type:", list("all users" = "all", "known users" = "kn", "unknown users" = "un", "new users" = "nw", "existing users" = "ex")) ), mainpanel(plotoutput("distplot")) ) )) shinyapp(ui = ui, server = server)

c r list shiny dashboard

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -