Dear Andy,
I've taken the liberty of copying this reply to the r-help and ess-help
lists since my last reply was misleading.
I believe that the problem with tkchooseDirectory() (you can see it by just
calling that function directly) is that it brings up a native Windows
dialog, and it's that kind of tcltk command that I've had trouble with in
ESS/XEmacs under Windows.
Regards,
John
-Original Message-
From: Liaw, Andy [mailto:[EMAIL PROTECTED]
Sent: Friday, September 24, 2004 3:23 PM
To: 'John Fox'
Subject: RE: using tcltk in R under ESS/XEmacs on Windows
Hi John,
demo(tkfaq) did work for me. Maybe that's the exception...
Thanks!
Andy
From: John Fox
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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Liaw, Andy
Sent: Friday, September 24, 2004 3:03 PM
To: [EMAIL PROTECTED]; 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
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help
--
Notice: This e-mail message, together with any attachments,
contains information of Merck Co., Inc. (One Merck Drive,
Whitehouse Station, New Jersey, USA 08889), and/or its
affiliates (which may be known outside the United States as
Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as
Banyu) that may be confidential, proprietary copyrighted
and/or legally privileged. It is intended solely for the use
of the individual or entity named on this message. If you
are not the intended recipient, and have received this
message in error, please notify us immediately by reply
e-mail and then delete it from your system.
--
__
[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