Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there a way to call R functions from C# and retrieve the result in C#

Tags:

c#

r

Is there a way to call R functions from C# and retrieve the result in C#?

like image 710
RockScience Avatar asked Apr 07 '11 05:04

RockScience


People also ask

How do you call a function in c in R?

Calling C functions from R Call is to use . External . It is used almost identically, except that the C function will receive a single argument containing a LISTSXP , a pairlist from which the arguments can be extracted. This makes it possible to write functions that take a variable number of arguments.

Does R use c?

So in conclusion: while R itself is mostly written in C (with hefty chunks in R and Fortran), R packages are mostly written in R (with hefty chunks written in C/C++).

Can you call functions in c?

Function Calling: A function call is an important part of the C programming language. It is called inside a program whenever it is required to call a function. It is only called by its name in the main() function of a program. We can pass the parameters to a function calling in the main() function.

Why does R use c?

1 Answer. The c function in R programming stands for 'combine. ' This function is used to get the output by giving parameters inside the function. The parameters are of the format c(row, column).


1 Answers

Given there is a COM interface to R, you can use C#'s COM interop to control it.

See this article for more details: http://www.codeproject.com/KB/cs/RtoCSharp.aspx

like image 57
Brendan Grant Avatar answered Oct 08 '22 21:10

Brendan Grant