2017-08-25 2 views

Répondre

0

Vous pouvez faire comme ceci:

library(shiny) 
ui <- fluidPage(titlePanel("Getting Iframe"), 
       sidebarLayout(
        sidebarPanel(
        textInput("url", label = "Enter url"), 
        actionButton("go", "Go") 
       ), 
        mainPanel(
        htmlOutput("frame") 
       ) 
       )) 

server <- function(input, output) { 
    output$frame <- renderUI({ 
    validate(need(input$go, message=FALSE)) 
    tags$iframe(src=isolate(input$url), height=600, width=535) 
    }) 
} 

shinyApp(ui, server) 
+1

je reçois un iframe blanc. Je pensais que c'était lent alors j'ai attendu mais rien ne se lève. Je reçois une erreur si je tape "www.google.com". Au lieu de cela, obtenez un espace blanc avec "https://www.google.com" –

+0

Essayez 'http: // example.com /'; Il semble que cela ne fonctionne pas avec les adresses https. –