使用webview或box容器打开R闪亮应用程序中的网站

时间:2018-01-18 08:58:46

标签: android r webview shiny android-webview

如果你运行下面的R闪亮脚本,你会得到两个盒子,上面的一个盒子用于输入链接,下面的框显示了网页。但是,我希望网站的整个功能都发生在下方框或者像android中的“web视图”这样的容器中。目前,只有少数网站被展示,网站的功能也受到限制。附上快照以供参考,请帮助。

library(shiny)
library(shinydashboard)
library(shinyWidgets)
ui <- dashboardPage(
dashboardHeader(title = "Web Site"),
dashboardSidebar(
width = 0
),
dashboardBody(
box(title = "Web Site Search", status = "primary",height = "155" ,width = 
"355"
    ,solidHeader = T,
    uiOutput("search_this")),
box( title = "Web Page", status = "primary", height = "442px",width = 
"155",solidHeader = T, 
     uiOutput("wepPage"))))
server <- function(input, output) 
{ 
output$search_this <- renderUI({
searchInput(inputId = "Id009", 
            label = "Enter the address",
            btnSearch = icon("search"), 
            btnReset = icon("remove"), 
            value='https://',
            width = "100%")
 })
  output$wepPage <- renderUI({
   return((HTML(readLines(input$Id009))))
  })
  }
  shinyApp(ui, server)

webpage capture

0 个答案:

没有答案