Issues with slickR in rshiny

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?

it might well be there, but you aren't seeing it ? I experienced similar until I
a) change the backgrounds of different ui elements so you could see the slickr by contrast
b) put auto sliding behaviour on the slickr to see it moving without needing to find the buttons to move from one slide to the next.
sidenote. for my convenience I had some pngs in my working directory so I simplified the pathing to getwd().

library(shiny)
library(slickR)

ui <- fluidPage(style="background:blue;",
  sidebarLayout(
    sidebarPanel(
    ),
    
    mainPanel(style="background:red;",
      slickROutput("slickr", width="500px")
    )
  )
)

server <- function(input, output) {
  
  output$slickr <- renderSlickR({
    imgs <- list.files(getwd(), pattern=".png", full.names = TRUE)
    slickR(imgs)+ settings(dots = TRUE, autoplay = TRUE, autoplaySpeed = 1000)
  }) 
}

shinyApp(ui = ui, server = server)

Hi Graham, thank you for looking into my issue. I tried the way you did. But still no progress.

Did you manage to see your app in Blue and Red at least?

The background color is changing, but I cannot see the images.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.