Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling R Script from within C-Code

Tags:

c++

c

r

interface

Is there a way to call an R-Script within C-Code?

I did find the R Api for C (chaper 6. of the 'Writing R Extensions' manual), but as far as I understood this does "only" allow to call the C-Implementation of R. Of cause I could call the R-Script via shell, but that's no solution for me, since this does not allow proper passing of data (at least no if I don't what to write the data into a Csv-File or something like this).

Is there a easy way of using the R to C parser beforehand?

like image 878
user320602 Avatar asked Nov 05 '22 14:11

user320602


1 Answers

is there some reason that you don't want to embed it? This is covered in this question: R from C — Simplest Possible Helloworld…

like image 141
Shane Avatar answered Nov 11 '22 02:11

Shane