Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 在渲染图像时避免重叠,使webshot处于发亮状态_R_Shiny_Widget_Overlap - Fatal编程技术网

R 在渲染图像时避免重叠,使webshot处于发亮状态

R 在渲染图像时避免重叠,使webshot处于发亮状态,r,shiny,widget,overlap,R,Shiny,Widget,Overlap,我正在尝试将元素移开,以使渲染的图像不与任何内容重叠(尝试动态地这样做,以便任何大小的页面都适合,只是将所有内容移开)。。。这整件事都很新鲜。提前谢谢你 library(shiny) library(webshot) ui <- fluidPage( titlePanel( fluidRow ( align = "center", h3("Screens")) ), sidebarLayout( #Side panel lay out to include

我正在尝试将元素移开,以使渲染的图像不与任何内容重叠(尝试动态地这样做,以便任何大小的页面都适合,只是将所有内容移开)。。。这整件事都很新鲜。提前谢谢你

library(shiny)

library(webshot)

ui <- fluidPage(
  titlePanel(
    fluidRow ( align = "center", h3("Screens"))
  ),

  sidebarLayout(
    #Side panel lay out to include variant, gene and disease info relevant to interpretation
    sidebarPanel(width=3,
                 h5("Screens")),


    mainPanel(
      textInput("screen1", h5("Screenshot1"), 
                value = "http://example.com/", width = "100%", placeholder = NULL),

      imageOutput("screen1"),

      textInput("screen2", h5("Screenshot2"), 
                value = "http://example.com/", width = "100%", placeholder = NULL),

      imageOutput("screen2")
    )))

server <- function(input, output, session) {

output$screen1 <- renderImage({
  webshot(input$screen1, zoom = 1, 
          file = "screen1.png") 
  list(src = "screen1.png",
       contentType = 'image/png')
})

output$screen2 <- renderImage({
  webshot(input$screen2 , zoom = 1, 
          file = "screen2.png") 
  list(src = "screen2.png",
       contentType = 'image/png')

})

}

shinyApp(ui = ui, server = server)
库(闪亮)
图书馆(网上热)

我不确定你到底有什么问题。我确实得到了一个
webshot.js返回的失败值:1
。是否安装了phantomJS?