【发布时间】:2018-01-05 06:50:34
【问题描述】:
我有闪亮的代码:
# ui.R
fluidPage(
selectInput("ci_risk_1000M", "<=",
choices = c("a" = 1, "b" = 2, "c" = 3, "d" = 4, "e" = 5, "f" = 6,
"g" = 7, "h" = 8, "i" = 9, "j" = 10, "k" = 11),
selected = 11),
tableOutput("ats")
)
# server.R
x <- 1:11
function(input, output, session) {
output$ats <- renderTable({x[x <= input$ci_risk_1000M]})
}
我想通过选定的输入过滤 x 值。但是,基本答案应该是行从 1 到 11 的表格,但它只显示值 1、10、11。你知道为什么以及如何解决这个问题吗? sliderInput 不是选项,除非它可以显示为字符值,而不是整数。
【问题讨论】: