【问题标题】:How to use R hands on table with shiny App如何通过闪亮的应用程序在桌子上使用 R 手
【发布时间】:2018-10-17 13:43:22
【问题描述】:

我正在尝试使用 rhandsontable 创建一个闪亮的应用程序。我正在使用下面的代码:

library(shiny)
library(rhandsontable)
library(ggplot2)


  ui = fluidPage(
  rHandsontableOutput ('table'))


  server = function(input, output, session) {
    output$table < renderRHandsontable(mpg)}

  shinyApp(ui, server)

当我运行代码时出现错误“不允许从闪亮输出渲染对象” 知道为什么会这样吗?

【问题讨论】:

    标签: r shiny rhandsontable


    【解决方案1】:

    应该这样做:

    library(shiny)
    library(rhandsontable)
    library(ggplot2)
    
    ui <- fluidPage(
      mainPanel(
        rHandsontableOutput('table')
      )
    )
    
    server = function(input, output, session) {
    
      output$table <- renderRHandsontable({
        rhandsontable(head(mpg))
      })
    
    }
    
    shinyApp(ui, server)
    

    【讨论】:

      猜你喜欢
      • 2014-04-11
      • 1970-01-01
      • 1970-01-01
      • 2021-01-19
      • 2016-10-23
      • 2021-04-19
      • 2016-12-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多