Do not use browseURL . This clearly opens the web page in a new window.
library(shiny) runApp(list(ui= fluidPage( titlePanel("opening web pages"), sidebarPanel( selectInput(inputId='test',label=1,choices=1:5) ), mainPanel( htmlOutput("inc") ) ), server = function(input, output) { getPage<-function() { return((HTML(readLines('http://www.google.com')))) } output$inc<-renderUI({ x <- input$test getPage() }) }) )
If you want to mirror the page, you can use iframe
library(shiny) runApp(list(ui= fluidPage( titlePanel("opening web pages"), sidebarPanel( selectInput(inputId='test',label=1,choices=1:5) ), mainPanel( htmlOutput("inc") ) ), server = function(input, output) { getPage<-function() { return(tags$iframe(src = "http://www.bbc.co.uk" , style="width:100%;", frameborder="0" ,id="iframe" , height = "500px")) } output$inc<-renderUI({ x <- input$test getPage() }) }) )
jdharrison
source share