【发布时间】:2017-03-12 20:52:32
【问题描述】:
我现在很挣扎,需要一些帮助。
我有两个 rhandondaables,因此有两个输出。在渲染函数中,我对数据框进行了一些更改,用户可以在 rhandsonable 中更改数据框。
第一个表:
output$out <- renderRHandsontable({
if (is.null(input$out)) {
hot <- rhandsontable(df())
} else {
hot <- hot_to_r(input$out)
hot <- rhandsontable(hot)
}
})
第二张桌子:
output$out2 <- renderRHandsontable({
if (is.null(input$out)) {
hot <- rhandsontable(df())
} else {
hot <- hot_to_r(input$out2)
hot <- rhandsontable(hot)
}
})
为了更清楚一点,让我们假设第一个表 (output$out) 以绝对数字显示一个表,第二个 (output$out2) 以百分比显示。我想指出的是,如果一个人更新了一个表,那么另一个表也需要更新。即百分比数字需要以绝对数字计算并“返回”到一个大的平面数据表。
现在我如何使这两个交互,以便如果我更新表一,更改将提交到表二,反之亦然,以便始终反映“最新”更改。
感谢任何帮助
【问题讨论】:
标签: r shiny output interactive