Skip to content

Instantly share code, notes, and snippets.

@zappingseb
Created July 16, 2019 08:32
Show Gist options
  • Save zappingseb/f1f5e382ecca919faf62ea243390f5c6 to your computer and use it in GitHub Desktop.
Save zappingseb/f1f5e382ecca919faf62ea243390f5c6 to your computer and use it in GitHub Desktop.
observeEvent(input$show_r_code, {
showModal(modalDialog(
title = "R Code",
tags$pre(
id = "r_code",
expandChain(
library_code,
data_code,
output$plot1(),
output$text1()
) %>% formatCode() %>% paste(collapse = "\n")
),
footer = tagList(
actionButton("copyRCode", "Copy to Clipboard", `data-clipboard-target` = "#r_code"),
modalButton("Dismiss")
),
size = "l",
easyClose = TRUE
))
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment