C test functions for lmer()
On Sun, Oct 3, 2010 at 2:05 AM, Koala <skorsky12 at gmail.com> wrote:
Hi everyone, I am trying to use lmer() using only C; Does anyone have test functions available that do not require R? My main routine needs to be C, but I am having a hard time understanding the data types going back and forth between R and lme4 C code. Any help would be appreciated,
Well, naturally enough, those structures are the internal representations of R objects - vectors, matrices, functions, etc. You would need to read the "Writing R Extensions" manual to understand their structure and even then you would need most of the R API to be able to manipulate them. If you really want to embark on this, and it is definitely not trivial, I would recommend looking at the code in the lme4a package instead, because it is based on C++ classes and the Rcpp package. I'm not sure that I see the point, though, as R is already open source. If you want to reimplement for another system you would probably be better off examining the structure of the calculations and reimplementing them instead of trying to adapt the lme4 code.