Re: [R] tcltk again

From: Richard Müller <>
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:

#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

______________________________________________ mailing list
PLEASE do read the posting guide
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 Please read the posting guide before posting to the list.