[R-SIG-Finance] Talking to C# API (Any reference to learn the same)

Mark Knecht markknecht at gmail.com
Sat Oct 11 19:04:42 CEST 2014


On Sat, Oct 11, 2014 at 8:13 AM, Kunal Shah <kunalshah305 at gmail.com> wrote:
> Hello,
>
> I have 250 R scripts.
>
> *Input*
> Each of them needs a real time data feed from a C# interface. The real time
> datafeed updates at a speed of approx 3 times a second. Also the data array
> size is increasing every minute. (1 minute time frame)
>
> *Output*
> I want to output say 4 variables from each of the R codes back to C#
> execution engine
>
> I wish to know the complete process. Can I get some references for the same?
>
> Since R cannot be multi threaded, can this be done easily? What is the best
> possible way?
>

I think you want to look at the Rcpp package. I've not used it myself
but it seems to address your interface issue.

As for 'multi-threading' I think in a very specific way you might look
at the foreach package and then the multi-processing packages like
doMC and doParallel. I'm using doMC & doParallel on Linux and have as
many as 12 identical processes (parameter exploration ala the
quantstratIII demo) running at the same time. If you need more than
the number of cores on your machine then I think you want ReDis but
I've never used it. There's web pages out there talking about it
though.

HTH,
Mark



More information about the R-SIG-Finance mailing list