This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shinyServer(function(input, output, clientData) { | |
output$myImage <- renderImage({ | |
# A temp file to save the output. | |
# This file will be removed later by renderImage | |
outfile <- tempfile(fileext='.png') | |
# Generate the PNG | |
png(outfile, width=400, height=300) | |
hist(rnorm(input$obs), main="Generated in renderImage()") | |
dev.off() |