I´m searching for a method to change the height
parameter in plotOutput()
depending on an input$..
value.
Any suggestions?
Samuel
Here you go:
library(shiny)
shinyApp(
ui = fluidPage(
numericInput("height", "height", 300),
plotOutput("plot", height = "auto")
),
server = function(input, output, session) {
output$plot <- renderPlot({
plot(1:10)
},
height = function(x) input$height)
}
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.