我有一个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)