Description Usage Value Examples
ClipboardJS source tags
1 |
source tags for loading ClipboardJS from cdn
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
library(shiny)
ui <- fluidPage(
prismDependencies('r', 'coy'),
clipboardjsDependencies(),
selectInput('x', 'x axis', choices = names(mtcars)),
selectInput('y', 'y axis', choices = names(mtcars)),
uiOutput('copy_code_btn'),
plotOutput('plot')
)
srv <- function(input, output, session) {
output$plot <- renderPlot({
plot(x = mtcars[[input$x]],
y = mtcars[[input$y]])
})
output$copy_code_btn <- renderUI({
clipCodeButton(id = "clipboard_btn", text = get_code(srv))
})
}
shinyApp(ui, srv)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.