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

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Mon 25 Sep 2006 - 06:55:26 GMT

Seth Falcon <sfalcon@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@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon Sep 25 16:57:37 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 25 Sep 2006 - 09:30:09 GMT.

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