[R-SIG-Mac] loading Rcmdr, R-Tcl/Tk errors due to X11

James Wettenhall wettenhall at wehi.EDU.AU
Wed Oct 19 04:24:38 CEST 2005


Hi,

This problem of getting Tcl/Tk errors in R on MacOSX because X11 isn't
running seems to be quite common, and unfortunately R's tcltk package is
currently unable to check whether X11 is running (if the operating system
is Darwin) and if not, give a friendly error message advising the user to
run X11.  My expertise on this is limited, but do people think it would be
possible for the tcltk package to automatically check for X11?  Obviously
this is platform dependent - X11 is not required on Windows.

A colleague of mine had Tcl/Tk errors and she found that she could only
start R-Tcl/Tk applications when her network cable was removed from her
laptop.  When the network cable was plugged in, X11 appeared to start OK,
but then it silently froze up due to some network problem.  So the
R-Tcl/Tk interface failed to initalize as a result.

Hope this was of interest to some people.
Best wishes,
James



> Hi Cormac,
>
> The error you are getting is because X11 isn't launched prior to when
> you are launching the tcltk package in R. Try rebooting, and attempt
> to launch X11 before loading R. If X11 still doesn't launch, then
> your problem isn't with R, and you might reinstalling X11.
>
> You also probably want to look at the OS X installation instructions
> for R Commander (http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/
> installation-notes.html).
>
> Dan
>
> On 18-Oct-05, at 3:54 PM, Cormac Lawler wrote:
>
>> (originally posted to R-Help - advised to post here)
>> Hi,
>> I'm using a Mac, I've downloaded R (base), and I'm trying to download
>> the package R Commander. I thought I had already done this (both from
>> the web and from within R) but it doesn't seem to be working - it's
>> not there as a "search()" reveals. However, there are plenty of files
>> on my system linked with Rcmdr - located in
>> HD>Library>Frameworks>R.framework>Versions>2.1.1>Resources>Library>Rcm
>> dr.
>> Is it simply in the wrong location to use it? The other possibility is
>> that I keep getting a tcltk error whenever I try to load up the
>> package from the Package Manager from within R - and when I try to
>> upload the tcltk package, this also gives the same error [1]. I also
>> get a "Couldn't launch application" error whenever I try to launch the
>> X11.app.
>>
>> This is probably so basic it's staring me in the eyes, but I need your
>> help please. I'd be happy to give any extra info you need.
>>
>> Thanks
>> Cormac
>>
>> [1] Loading required package: tcltk
>> Loading Tcl/Tk interface ... Error in dyn.load(x, as.logical(local),
>> as.logical(now)) :
>>        unable to load shared library
>> '/Library/Frameworks/R.framework/Resources/library/tcltk/libs/
>> tcltk.so':
>>  dlcompat: dyld: /Applications/R.app/Contents/MacOS/R can't open
>> library: /usr/local/lib/libtk8.4.dylib  (No such file or directory,
>> errno = 2)
>> In addition: Warning messages:
>> 1: cannot create HTML package index in: make.packages.html()
>> 2: cannot create HTML package index in: make.packages.html()
>> Error: .onLoad failed in 'loadNamespace' for 'tcltk'
>> Error: package 'tcltk' could not be loaded
>>
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>



More information about the R-SIG-Mac mailing list