0
s[enter image description here][1]server.R
df <- read.csv("")
output$out1 <- renderUI({ 

    params <- colnames(df)

    # These are the colum names goes as a list into the selectInput..
    param_list <- params  

    # Dynamically create dropdown box
    selectInput("params", label = "Choose a variable to Observe", choices = param_list)
    # print(param_list)

})

stateDataSubset <- reactive({

    input$params
    dataSetVariable <- input$params

 })

I am trying to use the input$param which is dynamically created in another function at another reactive function, not sure why I am getting this error as similar code in the past has worked. params is there in output$out1, now I want that input in stateDataSubset function.

enter image description here

Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100
vinsent paramanantham
  • 953
  • 3
  • 15
  • 34
  • Explain yourself better by reading these ... http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example Good Luck – user5249203 Feb 08 '16 at 18:04

1 Answers1

1

you need to provide proper example. Rather than just explaining users who have no idea of what you are trying to accomplish....Please provide input and seps of your code that lead to error. This explanation " created in another # function at another reactive function...." or saying " now I # want that input in stateDataSubset function." Which users have no idea will not be helpful.

And, to answer your error $ operator is invalid for atomic vectors, is self explained. You are trying to use $ to access a vector. to avoid that problem change whatever input is to a data.frame. Proper solution in code format could be provided only if you are able to explain your problem with example.

user5249203
  • 4,436
  • 1
  • 19
  • 45