inst/apps/example01-dragula/app.R

library(shiny)
library(dragulaR)

ui <- fluidPage(
        titlePanel("Drag and drop elements with dragulaR"),
        fluidRow(id = "plots",
                 column(6, plotOutput("iris")),
                 column(6, plotOutput("mtcars")),
                 column(6, plotOutput("AirPassengers")),
                 column(6, plotOutput("Formaldehyde"))),
        dragula("plots")

)

server <- function(input, output) {

  output$iris = renderPlot({plot(iris)})
  output$mtcars = renderPlot({plot(mtcars)})
  output$AirPassengers = renderPlot({plot(AirPassengers)})
  output$Formaldehyde = renderPlot({plot(Formaldehyde)})

}

shinyApp(ui = ui, server = server)

Try the dragulaR package in your browser

Any scripts or data that you put into this service are public.

dragulaR documentation built on May 1, 2019, 7:55 p.m.