library(shiny)
members <- data.frame(name=c("Name 1", "Name 2", "Name 3", "Name 4"), nr=c('ryo-en', 'ryo-cn', 'ryo-tw', 'ryo-jp'))
ui <- fluidPage(titlePanel("Getting Iframe"),
sidebarLayout(
sidebarPanel(
fluidRow(
column(6, selectInput("Member", label = h5("Choose a option"), choices = c('ryo-en', 'ryo-cn', 'ryo-tw', 'ryo-jp'))
))),
mainPanel(fluidRow(
htmlOutput("frame")
)
)
))
server <- function(input, output) {
observe({
query <- members[which(members$nr==input$Member),2]
lnk <<- paste0("https://rpubs.com/englianhu/",query)
})
output$frame <- renderUI({
input$Member
ui_lnk <- tags$iframe(src=lnk, height=600, width=535, frameborder = "no")
print(ui_lnk)
ui_lnk
})
}
shinyApp(ui, server)
Noticed the error shows above.
and then whats wrong with the logo states RPubs by RStudio since using rstudio packages, embed rpubs link to post on shiny...
References
- r - embed iframe inside shiny app - Stack Overflow
- Embed iFrame in Shiny #r #shiny · GitHub
- html - Iframe "(Site Name) Refused to Connect." Error - Stack Overflow
- r - Error publishing in RPubs from RStudio: - Stack Overflow
- publish - Error in publishing to RPubs from Rstudio - Stack Overflow
- Error while publishing in R pubs - Stack Overflow
- Publishing from HTML to RPubs not an option anymore? - Stack Overflow
- This site can’t be reached 127.0.0.1 refused to connect on mac
- Setting up a local web server on macOS 10… - Apple Community
- RStudio v1.2 "127.0.0.1 refused to connect." on macOS · Issue #5507 · rstudio/rstudio · GitHub
- Suggestion: bring back the "Publish to Rpubs" option - #3 by Andrea
- Error: embed sidebar & css background inside html file doesn't work (shiny) · Issue #2 · scibrokes/owner · GitHub