snippet | R Documentation |
Append code skeleton with shinybreakpoint
functionality to the
active (opened) file in RStudio.
snippet()
shinybreakpoint
needs server logic to be included in the function separated
from the server
part of app, was also developed having Bootstrap
version 5 in mind and some functionalities needs shiny::reactlog enabled
as well as managing temporary files (shinybreakpoint::set_filtering_by_id()
)
is responsible for this. This snippet takes care of all of that.
Snippet is also available as the addin, under the name snippet
.
Appends code skeleton to the file.
## Not run: # use shinybreakpoint::snippet() in the Console in RStudio # (or find `snippet` addin in Addins menu) # if there is an opened file (in Source Editor), # then this skeleton should be added to the file: library(shiny) shinybreakpoint::set_filtering_by_id() # TODO: remove ui <- fluidPage( theme = bslib::bs_theme(5), ) appServer <- function(input, output, session) { } server <- function(input, output, session) { shinybreakpoint::shinybreakpointServer() # TODO: remove appServer(input, output, session) } shinyApp(ui, server) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.