Re: [R] tcltk again

From: Richard Müller <r.mueller_at_oeko-sorpe.de>
Date: Sun, 30 Dec 2007 17:51:33 +0100

> > ...
> > I experimented with tkgetSaveFile(). But in the moment the user
> > gives the
> > filename the file is not yet generated! And I can't generate it in
> > advance,
> > because the filename is not yet specified.
>
> I don't see why this is a problem. In tkgetSaveFile(), the user can
> just navigate to the correct directory and then type a filename in.
> Then that would be returned. The following worked over here:
>
> x<-tkgetSaveFile()
> #.. go to right directory and type in filename
> tclvalue(x)
Thank you, Charilaos, for your posting.
I wrote the following:



require(tcltk)
#Tcl/Tk - Texteingabe
Datei <- tkgetSaveFile(initialdir="temp/",defaultextension=".pdf", initialfile="Haupt_Chl_ Phaeo.pdf")
fileName <- tclvalue(Datei)
pdf(fileName) # graphical device driver with filename ...(code for the graphics)...

As expected, I get an empty pdf-file. Specifying the pdf-device-driver results in automatically saving the generated pdf. The tkGetSave-function isn't helpful in this case. I must have the possibility to input a filename and then give this filename as an argument to the device-driver. Richard
-- 
Richard Müller - Am Spring 9 - D-58802 Balve-Eisborn
www.oeko-sorpe.de

______________________________________________
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.
Received on Sun 30 Dec 2007 - 16:56:22 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 30 Dec 2007 - 17:30:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.