结合R Shiny和googlevis运动图 [英] Combine R shiny and googlevis motion chart

查看:173
本文介绍了结合R Shiny和googlevis运动图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用带有googleVis动态图表的R Shiny部署网站, 但是在运行该应用程序时,动态图表会显示在IE浏览器的另一个窗口中.

I'd like to deploy a web site using R shiny with a googleVis motion chart, but when running the app, the motion chart showed up in another window in IE browser.

我想知道动态图表如何与R Shiny一起显示. 提前致谢.

I'm wondering how the motion chart can show up together along with the R shiny. Thanks in advance.

server.R

  shinyServer(function(input, output) {

   project_sub<-subset(project_all, select=c("name", "generation",
                                      "man_cost", "quantity"))
   motionchart2<-gvisMotionChart(project_sub, "name", "year2") 

   output$view_gviz <- renderGvis
   ({
           plot(motionchart2)
   })
})

ui.R

  shinyUI(fluidPage(
     titlePanel("Analysis of Project NRE"),
     mainPanel(

        h1("Motion Chart"),
        h4("A Motion Chart is an alternative to providing a quick visual 
        overview ofprojects."),
        plotOutput("view_gviz")
      )
  ))

推荐答案

我遇到了这个问题.在您的ui.R

I ran into this problem. Try this in your ui.R

# googleVis needs htmlOutput not usual PlotOutput
htmlOutput("view_gviz")

这篇关于结合R Shiny和googlevis运动图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆