[R-SIG-Mac] lme4 crashes R
Duncan Temple Lang
duncan at wald.ucdavis.edu
Fri Aug 6 14:17:52 CEST 2004
For what its worth, I'll just mention the small point that this is
place where the registration mechanism for routines
access via the .Call/.C/.Fortran/.External would help.
The change is
- sc = .Call("ssclme_sigma", object, PACKAGE = "Matrix")
+ sc = .Call("ssclme_sigma", object, REML, PACKAGE = "Matrix")
and if ssclme_sigma were registered with the entry
{"ssclme_sigma", (DL_FUNC) &ssclme_sigma, 2}
the .Call() mechanism would throw an error in the case that the routine was called
with only one argument. Type information is also specifiable.
As I say, just a small point.
D.
Douglas Bates wrote:
> 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.
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://www.stat.math.ethz.ch/mailman/listinfo/r-sig-mac
--
Duncan Temple Lang duncan at wald.ucdavis.edu
371, Kerr Hall
University of California at Davis
Phone: (530) 752-4782
FAX: (530) 752-7099
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 184 bytes
Desc: not available
Url : https://www.stat.math.ethz.ch/pipermail/r-sig-mac/attachments/20040806/cbe7b006/attachment.bin
More information about the R-SIG-Mac
mailing list