I am trying to input renderUI output in server.UI as an input for choices= parameter in selectInput. The reason being, i need to use the values selected by user as an input for a function. I see names, ID, attr instead of values when I pass these arguments. Below is my code. Appreciate any help. Thank you
The server.r, lists the searchable fields in pubmed ( Eg:title, ALl fields, # UID etc). These list need to pop up for user UI, and when he selects his fields # of interest. The selection need to be passed to other function.
At this time, the code runs but does not give me the list of searchable fields and unable to pass any selection.
server.R
shinyServer(
function(input, output) {
output$Choose_Feild <- renderUI({
a = data.frame(entrez_db_searchable(db = "pubmed",
config = NULL))
unlist(a$FullName, use.names = FALSE)
}))
ui.R
shinyUI(
fluidPage(
titlePanel(title = "My data "),
sidebarLayout(
sidebarPanel(
h3("Enter values"),
selectInput( inputId = "var_y",label = "Field" , choices =
uiOutput("Choose_Feild") )))