gpt4 book ai didi

r - 我想要连续有多个输入的 Shiny UI

转载 作者:行者123 更新时间:2023-12-05 08:31:41 24 4
gpt4 key购买 nike

我希望 Shiny 的 sliderInput 像附加图片一样 enter image description here

我想要的并排值,例如最小值和最大值。输入应该是手动的,而不是通过 slider 或下拉菜单

我试过 selectInput 但它连续取一个值我想在一行中取两个值

最佳答案

您可以使用 fluidRow()column()。您首先使用 fluidRow() 并在该函数中添加 columns(),...

可重现的例子:

library(shiny)
ui <- fluidPage(
fluidRow(
column(width = 3,
selectInput("min", "Min Price", 1:4)
),
column(width = 3,
selectInput("max", "Max Price", 1:4)
)
),
fluidRow(
column(width = 3,
selectInput("min2", "Property type", letters[1:4])
),
column(width = 3,
selectInput("max2", "Bedrooms", 1:4)
)
)
)

shinyApp(ui, server = function(input, output){ })

关于r - 我想要连续有多个输入的 Shiny UI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56384752/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com