mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-07 03:00:20 -04:00
Use simpler output format for 05_sliders
This commit is contained in:
@@ -6,11 +6,6 @@ shinyServer(function(input, output) {
|
||||
# Reactive function to compose a data frame containing all of the values
|
||||
sliderValues <- reactive(function() {
|
||||
|
||||
# Show values using R's default print format
|
||||
printValue <- function(value) {
|
||||
capture.output(print(value))
|
||||
}
|
||||
|
||||
# Compose data frame
|
||||
data.frame(
|
||||
Name = c("Integer",
|
||||
@@ -18,11 +13,11 @@ shinyServer(function(input, output) {
|
||||
"Range",
|
||||
"Custom Format",
|
||||
"Animation"),
|
||||
Value = c(printValue(input$integer),
|
||||
printValue(input$decimal),
|
||||
printValue(input$range),
|
||||
printValue(input$format),
|
||||
printValue(input$animation)),
|
||||
Value = as.character(c(input$integer,
|
||||
input$decimal,
|
||||
paste(input$range, collapse=' '),
|
||||
input$format,
|
||||
input$animation)),
|
||||
stringsAsFactors=FALSE)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user