using tcltk in R under ESS/XEmacs on Windows

John Fox jfox at mcmaster.ca
Fri Sep 24 22:16:21 CEST 2004


Dear Andy,

Perhaps it's possible, but I've never been able to get tcltk to work
properly under ESS/Xemacs on Windows. 

Regards,
 John

> -----Original Message-----
> From: ess-help-bounces at stat.math.ethz.ch 
> [mailto:ess-help-bounces at stat.math.ethz.ch] On Behalf Of Liaw, Andy
> Sent: Friday, September 24, 2004 3:03 PM
> To: r-help at stat.math.ethz.ch; ESS (Help list)
> Subject: using tcltk in R under ESS/XEmacs on Windows
> 
> Sorry for the cross-post.  Not sure where the problem is...
> 
> A while back I posted an R function to R-help:
> 
> cd <- function (dir = tclvalue(tkchooseDirectory()), saveOld = FALSE, 
>     loadNew = TRUE) {
>     stopifnot(require(tcltk))
>     if (saveOld) 
>         save.image(compress = TRUE)
>     setwd(dir)
>     rm(list = ls(all = TRUE, envir = .GlobalEnv), envir = .GlobalEnv)
>     if (loadNew && file.exists(".RData")) {
>         loaded <- load(".RData", envir = .GlobalEnv)
>         return(invisible(loaded))
>     }
> 
> where the default value for the `dir' argument is to run the 
> tcltk directory chooser and get the directory name chosen.  
> (Thanks to Prof. John Fox for the tcltk part!!)  While this 
> function works fine under Rgui on Windows, it doesn't work 
> when running R within ESS (5.2.3) and XEmacs (21.4.13).  The 
> directory chooser never shows up, and dir just gets the empty 
> string.  Does anyone have any idea what could be the problem? 
>  I'd very much appreciate any pointers.
> 
> Best,
> Andy
> 
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help




More information about the ESS-help mailing list