hi,
I wanted to convert a graph into image and display it in browser,
i got the image in the given folder and everything is coming out well but
the image is not being displayed,
even the error or warning is not being given so i dont know what exactly i
have made mistake in the code,
please can anyone help me out in this please.
sample = function(env) {
req = Rook::Request$new(env)
res = Rook::Response$new()
res$write('Name:\n')
res$write('<form method="POST">\n')
res$write('<input type="text" name="name1"
>\n<br>')
res$write('Age:\n')
res$write('<form method="POST">\n')
res$write('<input type="text" name="age"
>\n<br>')
res$write('Profession:\n')
res$write('<form method="POST">\n')
res$write('<input type="text" name="profession"
value="8">\n<br>')
res$write('<input type="submit"
name="Go!">\n</form>\n<br>')
if (!is.null(req$POST())) {
x<-req$POST()[["name1"]]
y<-req$POST()[["age"]]
n<-req$POST()[["profession"]]
res$write(x)
res$write('<br>')
res$write(y)
res$write('<br>')
res$write(n)
res$write('<br>')
png(file="P_Chart_All_Dims.png",
bg="transparent",width=900,height=480)
data(cars)
plot(cars,col="green")
dev.off()
res$write(' < P_Chart_All_Dims.png > ')
}
res$finish()
}
s = Rhttpd$new()
s$add(app = sample, name = "visbin")
s$start()
s$browse("visbin")
thanks in advance :)
-----
Thank you,
with regards,
Punitha
--
View this message in context:
http://r.789695.n4.nabble.com/problem-in-displaying-image-in-browser-using-Rook-tp4643596.html
Sent from the R help mailing list archive at Nabble.com.