Error in : object of type 'closure' is not subsettable slickR

72 Views Asked by At

Getting the Error in : object of type 'closure' is not subsettable error when trying to use slickR to output a slideshow for multiple inputs, how can I solve this?

  observeEvent(input$imagepreview, {
output$x <- renderImage({
  if (is.null(input$picture))
    return(NULL)

  if (input$picture == "Round Eye") {
    return(list(
      src = "images/roundeye.jpg",
      filetype = "image/jpeg",
      alt = "Face"
    ))
  }else if (input$picture == "Wayfarer" && input$arm == "Red" && input$body == "Yellow") {
  return(
    
    output$slickR <- renderSlickR({
    imgs <- list.files("C:/", pattern=".jpg", full.names = TRUE)
    slickR(imgs)
  })
)
}
else if (input$picture == "Square" && input$arm == "Blue" && input$body == "Green") {
  return(list(
    src = "images/wayfarercustom.jpg",
    filetype = "image/jpeg",
    alt = "This is a chainring"
  ))
}

}, deleteFile = FALSE) })

0

There are 0 best solutions below