1

the R shiny script below is such, that when your run the app, you get a search bar to enter the url, click "Enter" or "Reset" and the webpage opens up in browser window. My requirement is that instead of browser window, is there a way to open the app within R shiny itself. E.g. when I enter the url and hit enter, the website gets created inside a box input below. I know there are functions like iframe but it also has shortcomings. Also, when I run the app, my folder window opens up automatically, please suggest some approach here. Attaching the snapshot for reference

## Not run: 
library(shinyWidgets)
if (interactive()) {
ui <- fluidPage(
tags$h1("Search Input"),
br(),
searchInput(
  inputId = "search", label = "Enter your text",
  placeholder = "A placeholder",
  btnSearch = icon("search"),
  btnReset = icon("remove"),
  width = "450px"
),
br(),
verbatimTextOutput(outputId = "res")
)
server <- function(input, output, session) {
output$res <- renderPrint({
  #input$search
  shell.exec(input$search)
})
}
shinyApp(ui = ui, server = server)
}

Shinywidgets capture

Adam Shaw
  • 519
  • 9
  • 24
  • I guess this is [what](https://stackoverflow.com/a/33021018/5894457) you are looking for. – SBista Jan 17 '18 at 13:06
  • 2
    @SBista, thanks for replying here, the post that you have shared talks about using iframe, it certainly has limitations, please check the post https://stackoverflow.com/questions/9158024/iframe-with-external-page-not-working. Not every webpage can be embeded here. That's why I used shell.exec, kindly help me to put this within the dashboard and not in a browser window. – Adam Shaw Jan 17 '18 at 13:31

0 Answers0