Serving the Quantitative Finance Community

 
User avatar
quantnyu
Topic Author
Posts: 0
Joined: August 25th, 2009, 1:45 pm

[R in C#] Source files

April 26th, 2012, 5:48 pm

After much trouble, I've finally got a working example of R in C# through COM and believe I have a fairly good understanding of how it's written and how COM interacts with the registry. However, I'd like to call a source .R file, but it seems like the COM interface is not allowing me to do so? Any thoughts? I'm sure its something small, but I haven't uncovered anything directly pertaining to this.
 
User avatar
Hansi
Posts: 41
Joined: January 25th, 2010, 11:47 am

[R in C#] Source files

April 26th, 2012, 6:14 pm

What happens when you try it? What version R, what version of (D)Com?
 
User avatar
quantnyu
Topic Author
Posts: 0
Joined: August 25th, 2009, 1:45 pm

[R in C#] Source files

April 26th, 2012, 7:07 pm

R version 2.15.0DCOM version (statconn) 3.3STATCONNSRV verison 1.3Using the .dll's in the "Repository for R COM Server"OS - Windows XP x64 (if this matters?)I get a 0x80040009 OLE_E_CANT_GETMONIKER exception.
 
User avatar
Hansi
Posts: 41
Joined: January 25th, 2010, 11:47 am

[R in C#] Source files

April 26th, 2012, 7:12 pm

Have not seen that exception before but seems to be a generic one: http://www.zxro.net/uncategorized/repair-0x80040009/
 
User avatar
quantnyu
Topic Author
Posts: 0
Joined: August 25th, 2009, 1:45 pm

[R in C#] Source files

April 27th, 2012, 11:52 am

Ah, that's disappointing. Was hoping that it was a common issue.Just to confirm, it's no issue to call .EvaluateNoReturn("source(" + pathname +")") within the COM structure?
Last edited by quantnyu on April 26th, 2012, 10:00 pm, edited 1 time in total.
 
User avatar
quantnyu
Topic Author
Posts: 0
Joined: August 25th, 2009, 1:45 pm

[R in C#] Source files

April 27th, 2012, 4:47 pm

Turns out I was referencing an older version of my .R code, and the function was defined differently. Problem solved after I referenced the correct version on the code.