UnRisk 7

Forum Navigation:


FORUMS > Programming and Software Forum < refresh >
Topic Title: R in excel
Created On Tue Jun 20, 06 07:41 PM
Topic View:

View thread in raw text format


XYZ001
Junior Member

Posts: 3
Joined: Jun 2006

Tue Jun 20, 06 07:41 PM
User is offline

Hi,

Does anyone know how to call R command from excel? I want to do linear programming using R and sent back data to excel spreadsheet. Is there any excel addins available for this?

Thanks very much in advance.
XYZ
 
Reply
   
Quote
   
Top
   
Bottom
     



untwigged
Senior Member

Posts: 261
Joined: Jan 2006

Tue Jun 20, 06 08:42 PM
User is offline

Google found this, not tried it though - http://cran.r-project.org/contrib/extra/dcom/
 
Reply
   
Quote
   
Top
   
Bottom
     



ymikhale
Member

Posts: 53
Joined: Nov 2002

Wed Jun 28, 06 01:03 PM
User is offline

From VB I am using the following:

Dim R As StatConnector
Set R = New StatConnector
R.Init ("R")
R.EvaluateNoReturn("x<-1") (or any other command)

 
Reply
   
Quote
   
Top
   
Bottom
     



XYZ001
Junior Member

Posts: 3
Joined: Jun 2006

Tue Jul 04, 06 08:10 PM
User is offline

Thanks untwigged. Sorry for the late reply. I have installed the RExcel and looks like it's working. I will try it out more when I have time... too busy with some other projects at this moment.

Thanks ymikhale, let me try this out later too...
 
Reply
   
Quote
   
Top
   
Bottom
     



OliverP
Junior Member

Posts: 10
Joined: May 2003

Thu May 14, 09 11:20 AM
User is offline

Old thread but I'd be interested to learn if anyone has had any more experience with
RExcel. I am trying to use it in conjunction with the Bloomberg API and
have found it (or something) very unreliable.

I have 2 pcs pointing to the same R code, running the same version of Excel, R, RExcel
and the Bbg API. One runs all of the R code, the other runs half of the R code
(accessed from the same s/s).
I have checked everything I think sensible. Does any one have any experience with
this or tips?

Many thanks
 
Reply
   
Quote
   
Top
   
Bottom
     



Hamilton
Senior Member

Posts: 5967
Joined: Jul 2001

Sat May 16, 09 12:16 PM
User is offline

Process Trends

This isn't a direct answer to your question, but try this fellow's R with Excel website.
He's got some excellent resources, and you may find some help there.

Best,
H
 
Reply
   
Quote
   
Top
   
Bottom
     



OliverP
Junior Member

Posts: 10
Joined: May 2003

Mon May 18, 09 10:56 AM
User is offline

Thanks but that does not tell me

A). whether if I use RApply I should expect my entire R function to be re-run for each cell I pass in an array function - which seems ridiculous.

nor

B). why I encounter problems when I attempt to couple RExcel with the Bloomberg API.

If anyone has encountered this kind of problem before I'd be grateful for any input - before I accept defeat and port the whole thing to something more reliable.

If I call the same R function on the same Bbg data through the same version of RExcel, on the same version of Windows, Excel, R and Bloomberg I get different behaviour - on some pcs the function runs on others it does not.

I have tried switching off all Excel adins apart from Bbg and RExcel but the behaviour persists. It is not as simple as the RExcel interface not working (other R functions work on all machines through the RExcel interface on Bbg data) nor is it as simple as R not working /running the troublesome function on certain machines - it does on all machines (on static data) via the R console.

Thanks
 
Reply
   
Quote
   
Top
   
Bottom
     



OliverP
Junior Member

Posts: 10
Joined: May 2003

Wed May 20, 09 08:21 AM
User is offline

In case anyone else encounters this frustration:
2 network cards on a Bbg pc does not work with Excel it seems - we removed 1 network card and the R functions run through Excel.
Cheers,
oliverp
 
Reply
   
Quote
   
Top
   
Bottom
     

View thread in raw text format
FORUMS > Programming and Software Forum < refresh >

Forum Navigation:

© All material, including contents and design, copyright Wilmott Electronic Media Limited - FuseTalk 4.01 © 1999-2014 FuseTalk Inc. Terms & Conditions