[R] Me again, about the horrible documentation of tcltk

James MacDonald jmacdon at med.umich.edu
Thu Jul 5 22:45:36 CEST 2007


Hi Alberto,

It took me approximately 20 seconds to find all the arguments for this function. Here were the steps I took.

1.) Look at R help page ?tkgetOpenFile
2.) Hmmm. Lots of functions, but little info. But wait, what's this?

Details:

    [snip]

     There are far too many of these commands to describe them and
     their arguments in full.  Please refer to the Tcl/Tk documentation
     for details. With a few exceptions, the pattern is that Tk
     subcommands like 'pack configure' are converted to function names
     like 'tkpack.configure', and Tcl subcommands are like
     'tclfile.dir'.

3.) Type tkgetOpenFile at R prompt.

> tkgetOpenFile
function (...) 
tcl("tk_getOpenFile", ...)
<environment: namespace:tcltk>

4.) Google tk_getOpenFile.
5.) http://www.tcl.tk/man/tcl8.5/TkCmd/getOpenFile.htm 

Best,

Jim


-- 

James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623

>>> "Alberto Monteiro" <albmont at centroin.com.br> wrote:
> How on Earth can I know what are the arguments of any of the functions of 
> the tcl/tk package? I tried hard to find, using all search engines 
> available, looking deep into keywords of R, python's tkinter and tcl/tk, but 
> 
> nowhere I found anything remotely similar to a help.
> 
> For example, what are the possible arguments to tkgetOpenFile?
> 
> I know that this works:
> 
> library(tcltk)
> filename <- tclvalue(tkgetOpenFile(
>   filetypes="{{Qorn Files} {.jpg}} {{All files} {*}}"))
> if (filename != "") cat("Selected file:", filename, "\n")
> 
> but, besides filetypes, what are the other arguments to
> tkgetOpenFile? I would like to force the files to be sorted by
> time, with most recent files coming first (and no, the purpose is
> not to use for qorn files).
> 
> Alberto Monteiro
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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.



**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.



More information about the R-help mailing list