小编har*_*ari的帖子

在没有打开单独窗口的情况下打开闪亮窗口内的网页

我有一个URL随着闪亮的应用程序的输入而变化.我想打开一个网页,并在闪亮的窗口的选项卡面板中显示它.每次我更改输入时,网页URL都会更新,我想在同一个标​​签页中显示该页面.截至目前,使用R的browseURL函数,网页将在一个单独的窗口中打开,而不是闪亮的窗口.

这是我的案例的小测试示例

ui.R

shinyUI(fluidPage(
  titlePanel("opening web pages"),
  sidebarPanel(
    selectInput(inputId='test',label=1,choices=1:5)
    ),
  mainPanel(
    htmlOutput("inc")
  )
))
Run Code Online (Sandbox Code Playgroud)

server.R

shinyServer(function(input, output) {
  getPage<-function() {
    return((browseURL('http://www.google.com')))
  }
  output$inc<-renderUI({
    x <- input$test  
    getPage()
    })
})
Run Code Online (Sandbox Code Playgroud)

r shiny

10
推荐指数
1
解决办法
5572
查看次数

标签 统计

r ×1

shiny ×1