render_session_info | R Documentation |
Server render function for rendering informations about user session (app URL, username and pixel ratio)
render_session_info()
Use it with info_value UI function. If you want to use it with toggle_info(), you have to add outputOptions(output, [session info id], suspendWhenHidden = FALSE) to force rendering when the value is hidden.
Shiny render function to be saved as an element of output.
if(interactive()) {
library(shiny)
library(shiny.info)
ui <- fluidPage(
info_value("session_info")
)
server <- function(input, output, session) {
outputsession_info <- render_session_info()
# next line is required to work with toggle_info()
outputOptions(output, "session_info", suspendWhenHidden = FALSE)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.