getValue: Plot attributes

View source: R/parallelPlot.R

getValueR Documentation

Plot attributes

Description

Asks to retrieve the value of an attribute.

Usage

getValue(id, attrType, valueInputId)

Arguments

id

output variable to read from (id which references the requested plot)

attrType

which value is requested.

valueInputId

reactive input to write to.

Details

Available attributes are 'Cutoffs', 'SelectedTraces' and 'ReferenceColumn'. Result will be sent through a reactive input.

Value

No return value, called from shiny applications for side effects.

Examples

 if(interactive() && require(shiny)) {
   library(shiny)
   library(parallelPlot)

   ui <- fluidPage(
       actionButton("getSelectedTracesAction", "Retrieve Selected Lines"),
       p("The button displays the list of uncutted rows (use brush to reduce it)"),
       parallelPlotOutput("parPlot")
   )

   server <- function(input, output, session) {
       output$parPlot <- renderParallelPlot({
           parallelPlot(iris)
       })
       observeEvent(input$getSelectedTracesAction, {
           attributeType <- "SelectedTraces"
           parallelPlot::getValue("parPlot", attributeType, "MySelectedTraces")
       })
       observeEvent(input$MySelectedTraces, {
           showModal(modalDialog(
               title = "Selected Lines",
               toString(input$MySelectedTraces)
           ))
       })
   }

   shinyApp(ui, server)
 }


parallelPlot documentation built on April 19, 2023, 1:07 a.m.