setCorrPlotType {scatterPlotMatrix}R Documentation

Tells which type of correlation plot to use.

Description

Tells which type of correlation plot to use.

Usage

setCorrPlotType(id, corrPlotType)

Arguments

id

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

corrPlotType

One of the available correlation plot types (Empty, Circles, Text, AbsText).

Value

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

Examples

 if(interactive()) {
   library(shiny)
   library(scatterPlotMatrix)

   ui <- fluidPage(
     selectInput(
       "corrPlotTypeSelect",
       "Correlation Plot Type:",
       choices = list(
         "Empty" = "Empty",
         "Circles" = "Circles",
         "Text" = "Text",
         "AbsText" = "AbsText"
       ),
       selected = "Circles"
     ),
     p("The selector controls the type of correlation to use"),
     scatterPlotMatrixOutput("spMatrix")
   )

   server <- function(input, output, session) {
     output$spMatrix <- renderScatterPlotMatrix({
       scatterPlotMatrix(iris, zAxisDim = "Sepal.Length", continuousCS = "Plasma")
     })
     observeEvent(input$corrPlotTypeSelect, {
       scatterPlotMatrix::setCorrPlotType("spMatrix", input$corrPlotTypeSelect)
     })
   }

   shinyApp(ui, server)
 }


[Package scatterPlotMatrix version 0.2.0 Index]