| render_vol_widget | R Documentation |
The server half of the shiny pair.
render_vol_widget(expr, env = parent.frame(), quoted = FALSE)
expr |
An expression returning a |
env |
Environment in which to evaluate |
quoted |
Is |
Render a widget in shiny
The camera belongs to the pointer. A camera sent from the server is applied once and only when it carries a nonce the browser has not seen, so a rotation a reader has made survives every other change the server pushes.
A shiny render function.
vol_widget_output() for the user-interface half, vol_widget(),
vol_snapshot(), shinyVolumr().
if (interactive() && requireNamespace("shiny", quietly = TRUE)) {
ui <- shiny::fluidPage(
shiny::checkboxInput("slab", "Depth slab"),
shiny::actionButton("save", "Save a PNG"),
vol_widget_output("volume", height = "600px"))
server <- function(input, output, session) {
output$volume <- render_vol_widget(
vol_widget(vol_example_payload(), inputId = "volume"))
shiny::observeEvent(input$slab, vol_set("volume", list(slab = input$slab)))
shiny::observeEvent(input$save, vol_snapshot("volume", "volume.png"))
}
shiny::shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.