[R-SIG-Mac] lme4 crashes R
bates at wisc.edu
Thu Aug 5 22:36:37 CEST 2004
Simon Urbanek wrote:
> On Aug 5, 2004, at 12:55 PM, Andrew Beckerman wrote:
>> has anyone had success at building and running the source distribution
>> of lme4 from CRAN on OSX? I find that it builds, and will load as a
>> library, but running the lme example in lme4 causes R to crash - the
>> data file loads, the model appears to run, but attempting a summary()
>> or print() causes the crash.
> It's a bug which is not OS X specific. Attached you'll find a patch with
> the fix. I suspect that the reason is that lme4 uses direct calls to C
> code of Matrix (why doesn't Matrix provide R-level interface for this? I
> thought calling C code of another package is strongly discouraged...),
> the interface changed and one of those calls was not fixed.
The reason that the R code in lme4 calls C code from the Matrix package
directly is the usual reason - efficiency - and an unusual reason - some
of the C code in for use with the lme4 models requires access to some of
the sparse matrix code in C. You can have an R function in package A
call a C function in package B but you can't have a C function in
package A call a C function in package B. Thus we need to put all the C
code for the lme4 package in the Matrix package.
Thanks for the reminder.
More information about the R-SIG-Mac