[R-sig-dyn-mod] R-sig-dynamic-models: C Compiler for ODE solving in R

Daniel Kaschek daniel.kaschek at physik.uni-freiburg.de
Thu Apr 9 15:51:46 CEST 2015


Dear Soheil,


On Do, Apr 9, 2015 at 1:44 , Soheil Soltani <ssoheil at chalmers.se> wrote:
> Hello,
> 
> 
> I'm rather new to R, and I'm really interested in solving a system of 
> ODE using a compiled language. I have done the same thing with MATLAB 
> using a MEX file. I read through the vignette on writing code in 
> compiled languages where I found that it was recommended to use GNU 
> GCC compiler and that it is much more complicated to get other 
> compilers communicate with R. The problem is that I don't have GCC (I 
> work with visual studio on a win64 system), and when I searched a 
> little on the net I couldn't find a clear and stepwise guide on how 
> to install GCC. Could someone help me with this please?

What you basically need on Windows is RTools. See the following link 
for step-by-step instructions:

http://mcglinn.web.unc.edu/blog/linking-c-with-r-in-windows/

Once you have set this up, you can write down your ODE as raw C code as 
described in the vignette. You might also have a look at the cOde 
package which does the C code generation for you in an automated way.


>  How complicated it would be to keep using visual studio together 
> with R? I tried to compile the C-file using system("R CMD SHLIB 
> mech.c"), but R threw the following error:

Sorry, I cannot comment on this.

Best regards,
Daniel

Daniel Kaschek
Institute of Physics
Freiburg University

> _______________________________________________
> R-sig-dynamic-models mailing list
> R-sig-dynamic-models at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-dynamic-models

	[[alternative HTML version deleted]]



More information about the R-sig-dynamic-models mailing list