DeleteFile = FALSE in renderImage doesn't work
I have a problem with the deleteFile = FALSE argument for renderImage. In short, it deletes the image file anyway.
As a short test case, I have ui.R
library(shiny)
shinyUI(fluidPage(
titlePanel("Testing ..."),
sidebarLayout(
sidebarPanel(),
mainPanel(
imageOutput("f1")
)
)
))
and server.R
library(shiny)
shinyServer(function(input, output,session) {
output$f1 <- renderImage({
list(src="f1.png", deleteFile = FALSE)
})
})
where f1.png is some png image file. When I run this, it displays the image ok, but also deletes it from the folder, exactly what deleteFile = FALSE shouldn't do.
I'm on a Win7 machine, if that matters.
Wolfgang
Added: I have now found another way to do it using
output$f1 <- renderText({
HTML("<img src=\"f1.png\">")
})
and uiOutput in ui.R and that works great, but the original question remains, why are brilliant ones deleting image files despite the deleteFile = FALSE argument?
Wolfgang
+3
source to share