View source: R/perspective-shiny.R
| perspectiveProxy | R Documentation |
Creates a proxy object that can be used to update an existing Perspective
viewer in a Shiny app without re-rendering the entire widget. Use this with
psp_update, psp_replace, psp_clear, psp_restore,
and psp_reset to modify the viewer.
perspectiveProxy(session, outputId)
session |
The Shiny session object (usually |
outputId |
The output ID of the Perspective widget to control. |
A proxy object of class "perspective_proxy".
if (interactive()) {
server <- function(input, output, session) {
output$viewer <- renderPerspective({
perspective(mtcars)
})
observeEvent(input$add_data, {
proxy <- perspectiveProxy(session, "viewer")
psp_update(proxy, new_data)
})
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.