I want to plot something with renderDataTable
. Thats how I send it to the ui.R
output$myTable <- renderDataTable(myTableSelection())
Thats how the ui.R
recieves it:
... tabPanel("Title", value = 4, dataTableOutput("myTable ")))), ...
Before the table is rendered, some preprocessing of the data is necessary. I keep getting this errormessage:
Error in .func() : object 'input' not found
To narrow down the error I kept commenting out lines that process the dataframe
before sending it to renderDataTable
.
I narrowed it down to these lines:
someName <- eventReactive(input$someInputA, {
if( (as.integer(input$someInputB) == 2) ) {
return(someDf[someDf$someColumn %in% input$someInputA ,])
} else {
print("Whatever")
}
})
Everywhere else in my code it works when I refer to a variable from the ui.R
with input$whatever
, but not here.
When I print the two inputs document with the code that wont execute like so
observe({
print(input$someInputA)
print(input$someInputB)
})
It gets printed properly.
I even tried to assign input$...
to some variables in global.R
but that did not help neither. Any ideas why?!