setCorrPlotType {scatterPlotMatrix} | R Documentation |
Correlation plot type
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 ( |
Value
No return value, called from shiny applications for side effects.
Examples
if(interactive() && require(shiny)) {
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.3.0 Index]