[Rd] Problem with tcltk package: tclfile.dir missing?

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Sep 25 08:55:26 CEST 2006


Seth Falcon <sfalcon at fhcrc.org> writes:

> Hi,
> 
> In R version 2.4.0 beta (2006-09-24 r39502) I'm seeing the following
> behavior with the tcltk package:
> 
> > library("tcltk")
> Loading Tcl/Tk interface ... done
> 
> > tkfile.dir()
> Error: 'tkfile.dir' is defunct.
> Use 'tclfile.dir' instead.
> See help("Defunct")
> 
> > tclfile.dir
> Error: object "tclfile.dir" not found
> 
> ## But the function is in the package, just not exported?
> > tcltk:::tclfile.dir
> function (...) 
> tcl("file", "dir", ...)
> <environment: namespace:tcltk>

Heh, this obviously hasn't been exercised much... The issue is that
NAMESPACE contains

exportPattern("^tcl[[:alnum:]]*($|<-)") # skip S3 methods
exportPattern("^tk")

so the tk --> tcl prefix change doesn't automatically work on
functions with a dot in them. tclfile.tail is the only other case that
I can spot.

Best to fix in the obvious way at the current stage, but I wonder
whether it wouldn't have been better just to have tclfile("dir",
myfile) -- or for that matter just let users use the straightforward
tcl("file", "dir", myfile). (Or dirname(myfile) for that matter).

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-devel mailing list