XEmacs/ESS problem with ole automation in SPlus and RDCOMClient in R

Richard M. Heiberger rmh at temple.edu
Wed Mar 17 15:49:49 CET 2004


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.




More information about the ESS-help mailing list