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 14:22:37 CET 2004


Hi,

I have a problem that seems to be due to XEmacs/ESS
and it occurs with both R and SPlus.

I want to call a remote database using RDCOMClient in R 
(and ole automation in SPlus).
The code works if called from the R Console for R 
(or Insightful's GUI for SPlus) but 
the same code fails when called from within XEmacs with ESS.

### R within the Rconsole

R : Copyright 2003, The R Foundation for Statistical Computing
Version 1.8.1  (2003-11-21), ISBN 3-900051-00-3

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for a HTML browser interface to help.
Type 'q()' to quit R.

> library(RDCOMClient)
> mdo <- COMCreate("Fusion.Metadata")
> getMdo <- mdo[["getCountries"]]
> (colCount <- getMdo[["getColumnCount"]])
[1] 2
> (rowCount <- getMdo[["getRowCount"]])
[1] 232
### works correctly


### R from within XEmacs with ESS (M-x R)

R : Copyright 2003, The R Foundation for Statistical Computing
Version 1.8.1  (2003-11-21), ISBN 3-900051-00-3

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for a HTML browser interface to help.
Type 'q()' to quit R.

> options(STERM='iESS', editor='winclient.exe')
> library(RDCOMClient)
> mdo <- COMCreate("Fusion.Metadata")
### process hangs with no error produced.


### SPlus from within Insightful's GUI

S-PLUS : Copyright (c) 1988, 2002 Insightful Corp.
S : Copyright Lucent Technologies, Inc.
Professional Edition Version 6.1.3 Release 3 for Microsoft Windows : 2002 
Working data will be in S:\QRMS\Stats\project\energy                      
> mdo <- create.ole.object("Fusion.Metadata")
> getMdo <- (call.ole.method(mdo, "getCountries"))
> (colCount <- call.ole.method(getMdo, "getColumnCount"))
[1] 2
> (rowCount <- call.ole.method(getMdo, "getRowCount"))
[1] 232
### works correctly


### SPlus from within XEmacs with ESS (M-x Sqpe)

options(interactive=T)
S-PLUS : Copyright (c) 1988, 2002 Insightful Corp.
S : Copyright Lucent Technologies, Inc.
Professional Edition Version 6.1.3 Release 3 for Microsoft Windows : 2002 
Working data will be in S:/Qrms/Stats/splus/users/gavinj 
> library(sgui) # create.ole.object is in sgui
> search()
[1] "S:/Qrms/Stats/splus/users/gavinj" "splus"                           
[3] "stat"                             "data"                            
[5] "trellis"                          "nlme3"                           
[7] "sgui"                             "main"                            
> mdo <- create.ole.object("Fusion.Metadata")

Process S+6 trace trap at Fri Dec 05 11:46:32 2003
### error returned after about 5 seconds.


My objective is to write an interface to the database but 
that does not seem worthwhile if I can not run the code within XEmacs.
Has anyone encountered a similar problem
or can suggest some way to trap a more informative error
or somehow setup XEmacs to behave in a similar manner to the 
R and SPlus GUI.

Setup details
-------------
Windows XP (NT 5.1) and 
Emacs  : XEmacs 21.4 (patch 6) "Common Lisp (Windows)" 
[Lucid] (i586-pc-win32) of Mon Dec 17 2001 on TSUNAMI
Package: ess-mode 5.1.24
(some more ess details below)

Regards,

John.

John Gavin <john.gavin at ubs.com>,
Quantitative Risk Models and Statistics,
UBS Investment Bank, 6th floor, 
100 Liverpool St., London EC2M 2RH, UK.
Phone +44 (0) 207 567 4289
Fax   +44 (0) 207 568 5352



(Sqpe+6): ess-dialect=R, buf=fusion.R
(inferior-ess 0): ess-start-args=nil 
ess-setq-vars-default 0: ess-language=S, -dialect=S+6, buf=*ESS*, comint..echoes=nil, comint..sender=comint-simple-send
ess-setq-vars-default 1: ess-language=S, -dialect=S+6, buf=*ESS*, comint..echoes=nil, comint..sender=comint-simple-send
(inf-ess 1): lang=S, dialect=R, tmp-dialect=S+6, buf=fusion.R
(inf-ess 1.1): procname=S+6 temp-dialect=S+6, buf-name=*S+6* 
(inferior-ess) Method #2 buf=*S+6*
(ess-setq-vars-LOCAL): language=S, dialect=S+6, buf=*S+6*, comint..echoes=t, comint..sender=inferior-ess-input-sender
(inf-ess 2.1): ess-language=S, ess-dialect=S+6 buf=*S+6* 
(inf-ess 2.2): start args = nil, inf-ess-start-args=ALWAYS_PROMPT=X 
(inf-ess finish [S(S+6), c:/Program Files/Insightful/splus61/cmd/Sqpe.exe(S+6,S+6)]
(ess-multi 0):  inf-ess-start-args=ALWAYS_PROMPT=X, comint-..echoes=t
(i-ess 1): buf=*S+6*, lang=S, comint..echo=nil, comint..sender=comint-simple-send,
(i-ess 2): buf=*S+6*, lang=S, comint..echo=t, comint..sender=inferior-ess-input-sender,
(ess-setq-vars-LOCAL): language=S, dialect=S+6, buf=*S+6*, comint..echoes=t, comint..sender=inferior-ess-input-sender
(i-ess 3): curr-buf=*S+6*, comint..echo=t, comint..sender=inferior-ess-input-sender,
(ess-multi post inf-ess: start-args=ALWAYS_PROMPT=X, comint-echoes=t
(ess-multi 1):  start-args=ALWAYS_PROMPT=X 
Making Process...Buf *S+6*, Proc S+6, Prog c:/Program Files/Insightful/splus61/cmd/Sqpe.exe
 Start File=nil, Args= ALWAYS_PROMPT=X.
(ess-setq-vars-LOCAL): language=S, dialect=S+6, buf=nil, comint..echoes=t, comint..sender=inferior-ess-input-sender

(R): ess-dialect=R, buf=fusion.R, start-arg=nil
 current-prefix-arg=nil
(inferior-ess 0): ess-start-args=--ess  
ess-setq-vars-default 0: ess-language=S, -dialect=S+6, buf=*ESS*, comint..echoes=nil, comint..sender=comint-simple-send
ess-setq-vars-default 1: ess-language=S, -dialect=R, buf=*ESS*, comint..echoes=nil, comint..sender=comint-simple-send
(inf-ess 1): lang=S, dialect=R, tmp-dialect=R, buf=fusion.R
(inf-ess 1.1): procname=R temp-dialect=R, buf-name=*R* 
(inferior-ess) Method #3 start=S:\QRMS\Stats\project\fusion\scripts\ buf=*R*
(ess-setq-vars-LOCAL): language=S, dialect=R, buf=*R*, comint..echoes=nil, comint..sender=comint-simple-send
(inf-ess 2.1): ess-language=S, ess-dialect=R buf=*R* 
(inf-ess 2.2): start args = --ess , inf-ess-start-args=--ess  
(inf-ess finish [S(R), Rterm(S+6,nil)]
(ess-multi 0):  inf-ess-start-args=--ess , comint-..echoes=nil
(i-ess 1): buf=*R*, lang=S, comint..echo=nil, comint..sender=comint-simple-send,
(i-ess 2): buf=*R*, lang=S, comint..echo=t, comint..sender=inferior-R-input-sender,
(ess-setq-vars-LOCAL): language=S, dialect=R, buf=*R*, comint..echoes=t, comint..sender=inferior-R-input-sender
(i-ess 3): curr-buf=*R*, comint..echo=t, comint..sender=inferior-R-input-sender,
(ess-multi post inf-ess: start-args=--ess , comint-echoes=t
(ess-multi 1):  start-args=--ess  
Making Process...Buf *R*, Proc R, Prog Rterm
 Start File=nil, Args= --ess .
(R): inferior-ess-language-start=options(STERM='iESS', editor='winclient.exe')


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