setZAxis {scatterPlotMatrix}R Documentation

Z axis

Description

Tells which column to use as reference to determine color of each points.

Usage

setZAxis(id, dim)

Arguments

id

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

dim

name of the column to use as reference.

Value

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

Examples

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

   ui <- fluidPage(
     fluidRow(
       column(
         2,
         selectInput("zAxisSelect", "Z Axis:", colnames(iris))
       ),
       column(
         2,
         checkboxInput("zAxisUsedCB", "Use Z Axis", FALSE)
       )
     ),
     scatterPlotMatrixOutput("spMatrix")
   )

   server <- function(input, output, session) {
     output$spMatrix <- renderScatterPlotMatrix({
       scatterPlotMatrix(iris)
     })

     observe({
       scatterPlotMatrix::setZAxis(
         "spMatrix",
         if (input$zAxisUsedCB) input$zAxisSelect else NULL
       )
     })
   }

   shinyApp(ui, server)
 }


[Package scatterPlotMatrix version 0.3.0 Index]