reactive CellCODE heatmap
1
0
Entering edit mode
@christopherclarskon15-9965
Last seen 8.6 years ago

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?

cellcode shiny heatmap • 1.5k views
ADD COMMENT
1
Entering edit mode
Andrzej Oleś ▴ 750
@andrzej-oles-5540
Last seen 4.0 years ago
Heidelberg, Germany

Hi Christopher,

There seem to be some syntactical problems with your server function. Unlike the UI functions `dashboardPage` or `fluidRow`, which take as arguments different elements to include within the page, the server part is defined as a regular function; as such you shouldn't include commas `,` after `EmapTag` and `dataInput` definitions.

Cheers,

Andrzej

ADD COMMENT

Login before adding your answer.

Traffic: 690 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6