[R-sig-dyn-mod] Jacobian in compiled code

John Harrold john.m.harrold at gmail.com
Thu Apr 9 02:55:09 CEST 2015


Hello,

I'll start by saying that I'm relatively new to R. I'm trying to solve ODEs
using compiled code. I'm generating automation tools (creating the same
system in several formats including R-scrpt and the C code needed for R to
run compiled code, and right now it's not feasible for me to generate the
Jacobian right now. As I understand it, the Jacobian is used by some
solvers but I don't believe it's required (at least not by most of them).
Is it possible to write compiled code with only the ODEs specified? I've
done this in Matlab with C and their mex functionality. If it's possible,
can someone briefly describe what I'd have to change in one of the examples
in the vignette on writing code in compiled languages:

R Package deSolve, Writing Code in Compiled Languages
<http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CCIQFjAA&url=http%3A%2F%2Fcran.r-project.org%2Fweb%2Fpackages%2FdeSolve%2Fvignettes%2FcompiledCode.pdf&ei=jcwlVfbbNoT8oAT4_4HQAw&usg=AFQjCNFvPvW2Il_E8OGhkB-AiZVFrouHmw&sig2=qlAopNEfWAq4PhQt_bmN7w&bvm=bv.90491159,d.cGU>

Specifically do I need the 'jac' function (from the C examples). Do I
delete it? To I have it return a specific value like 0.

Thanks
John

	[[alternative HTML version deleted]]



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