setInvertedAxes | R Documentation |
Tells which axes have to be displayed with an inverted orientation.
setInvertedAxes(id, invertedAxes)
id |
output variable to read from (id which references the requested plot) |
invertedAxes |
Vector of boolean (one for each data column),
|
No return value, called from shiny applications for side effects.
if(interactive() && require(shiny)) {
library(shiny)
library(parallelPlot)
ui <- fluidPage(
checkboxInput("orientationCB", "Axis orientation", FALSE),
p("The check box controls the orientation of axes"),
parallelPlotOutput("parPlot")
)
server <- function(input, output, session) {
output$parPlot <- renderParallelPlot({
parallelPlot(iris)
})
observeEvent(input$orientationCB, {
invertedAxes <- rep(input$orientationCB, ncol(iris))
parallelPlot::setInvertedAxes("parPlot", invertedAxes)
})
}
shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.