XEmacs/ESS problem with ole automation in SPlus and RDCOMClient in R
john.gavin at ubs.com
john.gavin at ubs.com
Wed Mar 17 18:02:04 CET 2004
Hi Richard,
Thanks for the detailed reply.
> It looks like you are using M-x Sqpe in order to run S-Plus inside an
> emacs window. Then you are starting up sgui.
Correct. Sorry, I should have made that clearer.
> Since Insightful placed the ole commands in the sgui library,
> it suggests to me
> that the ole commands similarly depend on features that are
> not available when
> you run Sqpe in the DOS environment.
This seems plausible.
> The bug, then, is that
> you don't get a useful
> error message from S-Plus. The way to test this is to open
> Sqpe directly by clicking
> on the S-PLUS Console icon.
I tried this and it seems that you are correct.
With Sqpe via the S-PLUS console I get
> create.ole.object("Fusion.Metadata")
Problem: Couldn't find a function definition for "create.ole.object"
whereas the same line in the GUI command window produces
> create.ole.object("Fusion.Metadata")
An object of class "OLEClient"
Slot ".Data":
[1] 144754392
Slot "gui.id":
[1] 4113
Slot "gui.name":
[1] "Fusion.Metadata"
Slot "timestamp":
[1] 1079537932
> Now what you can do. The obvious next step is to use M-X S
> and start the S-Plus gui parallel to emacs (M-x S+6-existing
> to access an already running
> S-Plus gui session)
I have not tried to run the SPlus GUI in a parallel session to
XEmacs before. Unfortunately, this doesnt work for me, currently.
If I start SPLUS Console and then (from within XEmacs)
issue the command 'M-x S+6-msdos-existing', I see a buffer with
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
c:\temp\splus\energy>C:/etc/Insightful/splus62/cmd/Splus /MULTIPLEINSTANCES
S_PRINT_COMMAND=gnuclientw.exe S_PROJ=c:\temp\splus\energy
C:/etc/Insightful/splus62/cmd/Splus /MULTIPLEINSTANCES
S_PRINT_COMMAND=gnuclientw.exe S_PROJ=c:\temp\splus\energy
c:\temp\splus\energy>
but I get the error
'Searching for program: No such file or directory, ddeclient'.
I get a similar message about 'ddeclient' when I try
'M-x S+6-msdos-initialise'. With 'S+6-msdos', the error is
'Symbol's function definition is void: executable-find'.
I will have to reread the XEmacs and ESS manuals to
correct this problem. I vaguely recall that this
(XEmacs to a parallel SPlus Gui session) worked in the past.
> Other question
> It looks like you made some modifications to the ESS startup
> sequence. You did not
> include in the transcript the line that we send at the
> beginning of a session
> options(STERM='iESS', editor='gnuclient.exe',
> pager='gnuclientw.exe',
> help.pager='gnuclientw.exe')
> I think it is slightly different if you run XEmacs,
> specifically the gnuclient* options
> are different.
You are correct in that the startup line,
when calling SPlus from within XEmacs, only shows the option
'options(interactive=T)'.
But I have not intentionally made modifications to the ESS startup sequence,
so I searched my init.el file but didnt find entries related to
words like 'options', 'STERM', 'gnuclient' and 'iESS'
that I could play with.
The only relevant lines in my init.el file seem to be
;; http://stat.ethz.ch/ESS/ess_11.html#SEC53
;; If you run the S program (from the shell) with a command other than `Splus'
;; you will need to set the variable inferior-ess-program to
;; the name of the appropriate program by including a line such as
(setq inferior-ess-program "Splus")
;; in your `.emacs' file (substituting `S+' for the name of your S program.)
;
; To get SPlus V6.1 to run within an emacs buffer.
(setq-default inferior-S+6-program-name "C:/etc/Insightful/splus62/cmd/Splus")
(setq-default inferior-Sqpe+6-SHOME-name "C:/etc/Insightful/splus62/")
(setq-default inferior-Sqpe+6-program-name "C:/etc/Insightful/splus62/cmd/Sqpe.exe")
So I tried removing the ESS folder (...\XEmacs\xemacs-packages\lisp\ess)
and replaced it with the latest version from
http://www.analytics.washington.edu/downloads/ess/ess-5.2.0beta4.zip
But that didnt seem to change anything.
Any other suggestions would be most welcome
but at least I now know what I should be aiming for.
Thanks for your time.
Regards,
John.
> -----Original Message-----
> From: Richard M. Heiberger [mailto:rmh at temple.edu]
> Sent: 17 March 2004 14:50
> To: Gavin, John; ess-help at stat.math.ethz.ch
> Subject: Re: XEmacs/ESS problem with ole automation in SPlus and
> RDCOMClient in R
>
>
> My first guess is that it can't be done in a straightforward manner.
>
> It looks like you are using M-x Sqpe in order to run S-Plus inside an
> emacs window. Then you are starting up sgui. The problem is
> that sgui
> doesn't work outside of the S-Plus Commands window
> environment. If you
> attempt something like
> graphsheet()
> you get an informative Problem message:
> Problem in .C("S_axum_device",: Can only be run from
> S-PLUS graphical client.,
> while calling subroutine S_axum_device
>
> Since Insightful placed the ole commands in the sgui library,
> it suggests to me
> that the ole commands similarly depend on features that are
> not available when
> you run Sqpe in the DOS environment. The bug, then, is that
> you don't get a useful
> error message from S-Plus. The way to test this is to open
> Sqpe directly by clicking
> on the S-PLUS Console icon.
>
> For information on RDCOM, I suggest you post your question to
> the RCOM mailing list
> rcom-l at mailman.csd.univie.ac.at
>
> Now what you can do. The obvious next step is to use M-X S
> and start the S-Plus gui parallel to emacs (M-x S+6-existing
> to access an already running
> S-Plus gui session) (or S+6-msdos or S+6-msdos-existing if
> you are not using cygwin).
> This way all your code development can be done in the emacs
> environment and you send
> lines or regions over to the S-Plus commands window with C-c
> C-n or C-c C-r.
> When the task is complete, you highlight the Commands Window
> (either manually or with C-a),
> copy it with C-c, and paste it into an emacs buffer
> C-x C-f results.st
> C-x C-q
> C-y
>
>
> Other question
> It looks like you made some modifications to the ESS startup
> sequence. You did not
> include in the transcript the line that we send at the
> beginning of a session
> options(STERM='iESS', editor='gnuclient.exe',
> pager='gnuclientw.exe',
> help.pager='gnuclientw.exe')
> I think it is slightly different if you run XEmacs,
> specifically the gnuclient* options
> are different. The STERM option is there so you can write S
> language code that
> is aware of the environment in which it is running.
>
> From the ESS info:
> Is the Statistical Process running under ESS?
> =============================================
>
> For the S languages (S, S-Plus, R) ESS sets an option in
> the current
> process that programs in the language can check to determine the
> environment in which they are currently running.
>
> ESS sets `options(STERM="iESS")' for S language processes
> running in
> an inferior `iESS[S]' or `iESS[R]' buffer.
>
> ESS sets `options(STERM="ddeESS")' for independent S-Plus
> for Windows
> processes running in the GUI and communicating with ESS via the DDE
> (Microsoft Dynamic Data Exchange) protocol through a
> `ddeESS[S]' buffer.
>
> Other values of `options()$STERM' that we recommend are:
>
> * `length': Fixed length xterm or telnet window.
>
> * `scrollable': Unlimited length xterm or telnet window.
>
> * `server': S-Plus Stat Server.
>
> * `BATCH': BATCH.
>
> * `Rgui': R GUI.
>
> * `Commands': S-Plus GUI without DDE interface to ESS.
>
> Additional values may be recommended in the future as new
> interaction
> protocols are created. Unlike the values `iESS' and `ddeESS', ESS
> can't set these other values since the S language program is not under
> the control of ESS.
>
Visit our website at http://www.ubs.com
This message contains confidential information and is intend...{{dropped}}
More information about the ESS-help
mailing list