RE: [R] using tcltk in R under ESS/XEmacs on Windows
Tony: It is indeed most amazing that you have been able to get ESS/Emacs running under Windows. And much appreciated by those of us who have to moil around with MessySoft machines. Thanks to all who have contributed to the effort. Cheers, Shawn Boles -Original Message- From: A.J. Rossini [mailto:[EMAIL PROTECTED] Sent: Saturday, September 25, 2004 8:04 PM To: Liaw, Andy Cc: R-Help; [EMAIL PROTECTED]; ESS (Help list) Subject: Re: [R] using tcltk in R under ESS/XEmacs on Windows It most likely is Windows specific. It's most amazing that we actually have ESS/(X)Emacs working under windows in the first place. Unfortunately, I'm in transit for the next few weeks, but I'll probably have a windows machine on my desk sometime after that. Argh. best, -tony On Fri, 24 Sep 2004 17:48:18 -0400, Liaw, Andy [EMAIL PROTECTED] wrote: From: Marc Schwartz On Fri, 2004-09-24 at 15:02, Liaw, Andy wrote: 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 Andy, This works under FC2 using ESS 5.2.3 with XEmacs version 21.4.15, so presumably there is something specific to the Windows implementation? Given Prof. Fox's follow-up and your obvservation, I guess the problem _is_ Windows-specific. 8-( Also, two things: 1. You are missing a closing brace above, which I presume may be a simple copy and paste issue. Yes. My apologies. 2. If you successfully change the directory, the cd() function itself is deleted from the global environment via your rm(...), as you currently have it implemented. I am not sure if this is intentional or not. Well, sort of. I've placed it in a small package along with other handy stuff, so that won't be a problem. Best, Andy HTH, Marc __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- A.J. Rossini [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/ess-help __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] using tcltk in R under ESS/XEmacs on Windows
It most likely is Windows specific. It's most amazing that we actually have ESS/(X)Emacs working under windows in the first place. Unfortunately, I'm in transit for the next few weeks, but I'll probably have a windows machine on my desk sometime after that. Argh. best, -tony On Fri, 24 Sep 2004 17:48:18 -0400, Liaw, Andy [EMAIL PROTECTED] wrote: From: Marc Schwartz On Fri, 2004-09-24 at 15:02, Liaw, Andy wrote: 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 Andy, This works under FC2 using ESS 5.2.3 with XEmacs version 21.4.15, so presumably there is something specific to the Windows implementation? Given Prof. Fox's follow-up and your obvservation, I guess the problem _is_ Windows-specific. 8-( Also, two things: 1. You are missing a closing brace above, which I presume may be a simple copy and paste issue. Yes. My apologies. 2. If you successfully change the directory, the cd() function itself is deleted from the global environment via your rm(...), as you currently have it implemented. I am not sure if this is intentional or not. Well, sort of. I've placed it in a small package along with other handy stuff, so that won't be a problem. Best, Andy HTH, Marc __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- A.J. Rossini [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] 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 __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Re: [R] using tcltk in R under ESS/XEmacs on Windows
On Fri, 2004-09-24 at 15:02, Liaw, Andy wrote: 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 Andy, This works under FC2 using ESS 5.2.3 with XEmacs version 21.4.15, so presumably there is something specific to the Windows implementation? Also, two things: 1. You are missing a closing brace above, which I presume may be a simple copy and paste issue. 2. If you successfully change the directory, the cd() function itself is deleted from the global environment via your rm(...), as you currently have it implemented. I am not sure if this is intentional or not. HTH, Marc __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
RE: [R] using tcltk in R under ESS/XEmacs on Windows
From: Marc Schwartz On Fri, 2004-09-24 at 15:02, Liaw, Andy wrote: 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 Andy, This works under FC2 using ESS 5.2.3 with XEmacs version 21.4.15, so presumably there is something specific to the Windows implementation? Given Prof. Fox's follow-up and your obvservation, I guess the problem _is_ Windows-specific. 8-( Also, two things: 1. You are missing a closing brace above, which I presume may be a simple copy and paste issue. Yes. My apologies. 2. If you successfully change the directory, the cd() function itself is deleted from the global environment via your rm(...), as you currently have it implemented. I am not sure if this is intentional or not. Well, sort of. I've placed it in a small package along with other handy stuff, so that won't be a problem. Best, Andy HTH, Marc __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html