Description Usage Arguments Details Value Examples
Server render function for info value
1 2 | render_info_value(expr, env = parent.frame(), quoted = FALSE,
sep = " ", add_name = TRUE)
|
expr |
value to render |
env |
The environment in which to evaluate expr. Default parent.frame() |
quoted |
Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable. Default FALSE |
sep |
A separator passed to cat to be appended after each element. |
add_name |
Should expression name be added. Default TRUE |
If you want to use it with toggle_info(), you have to add outputOptions(output, [info value id], suspendWhenHidden = FALSE) to force rendering when the value is hidden.
Shiny render function to be saved as an element of output.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | if(interactive()){
library(shiny)
library(shiny.info)
ui <- fluidPage(
info_value("value_to_display")
)
server <- function(input, output, session) {
test_reactive <- reactiveVal("some value")
output$value_to_display <- render_info_value(expr = test_reactive())
# next line is required to work with toggle_info()
outputOptions(output, "value_to_display", suspendWhenHidden = FALSE)
}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.