[R] Can data.frame be saved as image?
arun
smartpink111 at yahoo.com
Fri Dec 21 16:26:28 CET 2012
Hi Katherine,
You could try this:
library(plotrix)
png("katherine.png")
plot(0:3,0:3,xlab="",ylab="",type="n",axes=FALSE)
addtable2plot(1,1,output1,cex=2)
dev.off()
A.K.
----- Original Message -----
From: Katherine Gobin <katherine_gobin at yahoo.com>
To: r-help at r-project.org
Cc:
Sent: Friday, December 21, 2012 8:59 AM
Subject: [R] Can data.frame be saved as image?
Dear R forum
I have one stupid question, but I have no other solution to it in sight?
Suppose some R process creates graphs etc alongwith main output as data.frame e.g
output1 = data.frame(bands = c("A", "B", "C"), results = c(74, 108, 65))
I normally save this output as some csv file.
But I need to save this output as some image (I understand this is weird, but I need to find out some way to do so) e.g. for graph, I use 'png' as
png("histogram.png", width=480,height=480)
.....................
..................
dev.off()
Please advise.
Regards
Katherine
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: katherine.png
Type: image/png
Size: 4972 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20121221/adf4455f/attachment-0002.png>
More information about the R-help
mailing list