R 闪亮应用程序中灵活的绘图高度
我正在搜索一种方法来更改R 闪亮应用程序中灵活的绘图高度,r,plot,shiny,R,Plot,Shiny,我正在搜索一种方法来更改plotOutput()中的height参数,具体取决于input$..值 有什么建议吗 塞缪尔给你: library(shiny) shinyApp( ui = fluidPage( numericInput("height", "height", 300), plotOutput("plot", height = "auto") ), server = function(input, output, session) { out
plotOutput()
中的height
参数,具体取决于input$..
值
有什么建议吗
塞缪尔给你:
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)
}
)
库(闪亮)
shinyApp(
ui=fluidPage(
数字输入(“高度”,“高度”,300),
绘图输出(“绘图”,高度=“自动”)
),
服务器=功能(输入、输出、会话){
输出$plot在这里:
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)
}
)
库(闪亮)
shinyApp(
ui=fluidPage(
数字输入(“高度”,“高度”,300),
绘图输出(“绘图”,高度=“自动”)
),
服务器=功能(输入、输出、会话){
输出$plot您到目前为止尝试了什么?请为正在工作的闪亮应用程序添加代码,直到您卡住为止。最简单的解决方案是使用ggvis
:它允许您调整绘图大小,而无需编写任何程序。您到目前为止尝试了什么?请为正在工作的闪亮应用程序添加代码,直到您卡住为止。si最简单的解决方案是使用ggvis
:它允许您调整绘图大小,而无需编写任何程序。