Re: [R] tcltk issue remains

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Mon, 07 Apr 2008 10:47:32 -0400

On 4/7/2008 10:16 AM, Ingmar Visser wrote:
> Dear R-help,
>
> I'm trying to load the fGarch package and keep running into problems
> with tcltk:
>
> After succesfully instaling fGarch (and dependencies) I get:
>
> >library(fGarch)
> Loading required package: fBasics
> Loading required package: fImport
> Loading required package: fSeries
> Loading required package: robustbase
> Loading required package: fCalendar
> Loading required package: MASS
> Loading required package: fEcofin
> Loading required package: fUtilities
> Loading required package: RUnit
>
> RUnit 0.4.17 loaded.
> Loading required package: spatial
> Loading required package: tcltk
> Loading Tcl/Tk interface ... Error in fun(...) : couldn't connect to
> display ":0"
> Error : .onLoad failed in 'loadNamespace' for 'tcltk'
> Error: package 'tcltk' could not be loaded
>
> Then, after checking the OSX faq, I get
>
> >Sys.putenv("DISPLAY"=":0")
> Warning message:
> 'Sys.putenv' is deprecated.
> Use 'Sys.setenv' instead.
> See help("Deprecated")
>
> But the problem remains:
>
> Sys.setenv("DISPLAY"=":0")
> > library(fGarch)
> Loading required package: fBasics
> Loading required package: fImport
> Loading required package: fSeries
> Loading required package: fCalendar
> Loading required package: fEcofin
> Loading required package: fUtilities
> Loading required package: tcltk
> Loading Tcl/Tk interface ... Error in fun(...) : couldn't connect to
> display ":0"
> Error : .onLoad failed in 'loadNamespace' for 'tcltk'
> Error: package 'tcltk' could not be loaded
>
> I am not sure what the tcltk interface does and what I need it for ...
> Also, tcltk is not listed in the package list but tcltk2 is so I'm
> not sure which package is being loaded
> here?

tcltk is a base package, distributed with R.

> What can I do about this?

It may be as simple as starting X windows before you try to load tcltk. On OSX, X isn't normally running, but the tcltk implementation used by R requires it. Try clicking on the X in the menu bar if you're using R.app, or start R from an X terminal if you're used to the command line version.

If that's not sufficient, I'd suggest asking on the R-sig-mac list, where you'll find the real Mac experts, not just occasional users like me.

> Best, Ingmar
>
> > sessionInfo()
> R version 2.6.2 (2008-02-08)
> powerpc-apple-darwin8.10.1

I'm not sure how Apple version numbers work, but that one looks old: it may be that R 2.6.2 doesn't support it any more.

Duncan Murdoch

>
> locale:
> en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] spatial_7.2-40 RUnit_0.4.17 MASS_7.2-40 robustbase_0.2-8
>
>
>
> Ingmar Visser
> Department of Psychology, University of Amsterdam
> Roetersstraat 15
> 1018 WB Amsterdam
> The Netherlands
> t: +31-20-5256723
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org 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.



R-help_at_r-project.org 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. Received on Mon 07 Apr 2008 - 15:06:57 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 07 Apr 2008 - 15:30:26 GMT.

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

list of date sections of archive