I have a set of PNG files in a local folder, which I want to display in rshiny app under mainpanel. The code is very simple (referred from stackoverflow. The link for reference is here- https://stackoverflow.com/questions/51531743/image-slideshow-in-r-shiny).
My code -
library(shiny)
library(slickR)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
),
mainPanel(
slickROutput("slickr", width="500px")
)
)
)
server <- function(input, output) {
output$slickr <- renderSlickR({
imgs <- list.files("C:/Users/xxxxxx/xxxxxx/analytics/SAMPLES/Sample 9/", pattern=".png", full.names = TRUE)
slickR(imgs)
})
}
Run the application
shinyApp(ui = ui, server = server)
When am building the app, it gives me a blank screen.
In order to debug the issue, I simply executed slickR commands without the shiny structure. It works there. Can anyone tell me what am I missing?