Perhaps the One R Tip a Day might be helpful.
The first part of this example saves a png file.

http://onertipaday.blogspot.com/2009/01/statistical-visualizations-part-2.html

Good luck,
Jim

RagingJim wrote:
Thanks mate, will get the zoo package ASAP. I have been working on the file
open/save part, and it works as planned except for one bit. When I save it,
it does not save as the relevant file type.

This is again my code:

require(tcltk)
fileName<-tclvalue(tkgetSaveFile(filetypes="{{PNG Files} {.png}} "))
png(fileName)
barplot(Ann,main="Annual Rainfail Data", xlab="Year",ylab="Rainfall
(mm)",ylim=c(0,ymax),col="blue",space=0,names.arg=c(kent[,2]),
cex.names=0.8)
legend("topleft",c("This picture"),bty="n")
dev.off()

When I go to save it, the corrent save window pops up, and it has the png
file format selected, yet when I type in a name and save, it is saved
without a file type. What am I doing wrong?

Thanks again for your help


______________________________________________
R-help@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.

Reply via email to