[Rd] Installing a Tcl/Tk Extension on OSX

Philippe Grosjean phgrosjean at sciviews.org
Thu Sep 2 11:01:00 CEST 2010


This is relatively simple if you can find the packages you need in the 
default Tcl/Tk install on the Mac (/System/Library/Tcl) and if these 
packages are compatibles with the X11 Tcl/Tk used by R. This should be 
fine for packages containing no compiled code. For the others, you 
should check first (but for instance, Img and tsl work for me - Mac OS X 
10.6.4). You can then use these package in R own Tcl environment like this:

 > library(tcltk)
Loading Tcl/Tk interface ... done
 > addTclPath("/System/Library/Tcl")
 > tclRequire("Img")
<Tcl> 1.4

Best,

Philippe

..............................................<°}))><........
  ) ) ) ) )
( ( ( ( (    Prof. Philippe Grosjean
  ) ) ) ) )
( ( ( ( (    Numerical Ecology of Aquatic Systems
  ) ) ) ) )   Mons University, Belgium
( ( ( ( (
..............................................................

On 01/09/10 18:16, Adrian Waddell wrote:
> Dear R-Community,
>
> I need the Img tk extension for my R package. It all works on my Ubuntu
> machine (libtk-img). However I experience a great deal of trouble when I
> try to install the package on OSX 10.5 or 10.6 (in fact I'm not able to
> do it).
>
> As I understand it, the ActiveTcl with it's teacup package manager do
> not have an effect on the the x11 tcl installation which R accesses.
> MacPorts however has the libtk-img package not listed and compiling it
> from the source (with configure, make all, make install) does not do the
> job either for me (adding the compiled package folder to auto_path).
>
> Now, as I would like some R users to once use my R package (once it's on
> CRAN), installing the Img tk extension should to be a fairly easy task
> on OSX .
>
> Can anybody tell me how I best tackle this problem in a way, such that
> OSX R users (and myself) in future can easily install the Img tk package?
>
> Sincerely,
>
> Adrian Waddell
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



More information about the R-devel mailing list