I was wondering what is wrong with this code.
....do some calculation ....
png(file=outputfile)
....call plot()...to produce a plot....
....
cat("<br>")
img(imgoutfile); <<<<<<this is just an R function that produces
html <img> tag...
cat("</BODY></HTML>\n")
file.remove(outputfile)- <<<<<< Putting this causes problem......
DONE
My goal was to remove the file on the server once it is displayed on
the browser...but as soon as I introduce file.remove() line....the
file is indeed deleted on the server..but the image is not displayed
at all..instead all I see is a broken sign...where an Image should
have been...
Is there anything wrong with this code sequence..?
Thanks all.
George
George
--
You received this message because you are subscribed to the Google Groups "rapache" group.
To post to this group, send email to rap...@googlegroups.com.
To unsubscribe from this group, send email to rapache+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rapache?hl=en.
img <- function (src)
{
result <- src
result <- paste("<IMG SRC=\"", result,
"?nocache=", sample(9999, 1), "\"",
sep = "")
result <- paste(result, ">", sep = "")
cat(result)
invisible(result)
}
Thanks.
George
On Dec 17, 2:56 pm, Aleksandar Blagotić <aca.blago...@gmail.com>
wrote: