I am trying to create an action button whereby I select a set of input parameters via checkboxes and a slider and then upon clicking the action button I the data to be re-analysed in R and the graph to re-render to the page. My attempt is as follows:
uicell <- dashboardPage(
dashboardHeader(title="TB Diagnostic Biomarkers"),
dashboardSidebar(),
dashboardBody(
fluidRow(
box(checkboxGroupInput("selections", label = "Select tagData", choices = colnames(GENES_TO_CONTRAST))
),
box(sliderInput(inputId="num5", label="Choose par", value=0.3, min=0, max=0.7),
actionButton(inputId="change", label="Update"), value=colnames(GENES_TO_CONTRAST)),
box(plotOutput("SPV"))
)
)
)
servercell <- function(input, output) {
EmapTag=tagData(GENES_TO_CONTRAST[, input$selections], 0.7, max=15, ref=E.rna2, ref.mean=F),
dataInput<-eventReactive(input$change, {
runif(input$change)
}),
output$SPV<-renderPlot({
getAllSPVs(E.rna2, grp=outcome, dataTag=dataInput(), method="raw", plot=T, mix.par=input$num5)
})
}
shinyApp(uicell, servercell)
Everything looks fine up until the error: "object output not found" after "output$SPV<-renderPlot({.....})"
Does anyone know how I might improve my code to get the graph to re-render upon resetting the input options and clicking the update button?