Search
Question: reactive CellCODE heatmap
0
gravatar for christopher.clarskon15
19 months ago by
christopher.clarskon1520 wrote:

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?

ADD COMMENTlink modified 19 months ago by Andrzej Oleś670 • written 19 months ago by christopher.clarskon1520
1
gravatar for Andrzej Oleś
19 months ago by
Andrzej Oleś670
EMBL Heidelberg, Germany
Andrzej Oleś670 wrote:

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 COMMENTlink modified 19 months ago • written 19 months ago by Andrzej Oleś670
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 314 users visited in the last hour