[R-sig-ME] Bug report for lme
Michal Figurski
figurski at mail.med.upenn.edu
Mon Mar 14 14:34:03 CET 2011
Douglas,
It seems that I didn't make myself entirely clear, so here are a few
clarifications. I also attach some data and a reproducible example that
crashes R - at least on my machine.
Clarifications:
- "hundreds of lines" - this was actually just one line in R output.
This was part of the error message. I selected it and pasted into the
email body, and it got converted to multiple lines... I agree this is
unlikely to be helpful, though I was not sure, so I pasted the entire
error message.
- formula with 'paste()' is not a problem to me - I use it daily and
it always works. Though for your convenience, in the attached code I
used explicit formula - the outcome is unfortunately the same.
- my .RData file is not corrupt and R starts normally. It only crashes
after I run the problem code.
The code to reproduce the error:
# ******************************************************************* #
# Working example to reproduce crash
library(lme4)
# Read the data in - replace path with your path
b <- read.csv("crash-example.csv")
b$Aliq <- factor(b$Aliq)
b$SPL <- factor(b$SPL)
# 1st example, to show that it works - on a selected set of data
# It takes a few moments, but it works - at least it doesn't crash R:
bb <- b[b$SPL %in% unique(b$SPL[b$Plate=="TRT1"]),]
b.1 <- lmer(Conc~SPL + (SPL|Plate:Aliq)-1, data=bb)
# 2nd example - it takes only a few seconds and R crashes:
# R-version 2.12.2 on Win7 64bit
# Package lme4 version 0.999375-39
# Previously, when used in R 2.11.1 with lme4 version 0.999375-35,
# I got the error that I pasted in the message before, but the R
# did not crash.
b.2 <- lmer(Conc~SPL + (SPL|Plate:Aliq)-1, data=b)
# ******************************************************************* #
Kind regards,
--
Michal J. Figurski, PhD
HUP, Pathology & Laboratory Medicine
Biomarker Research Laboratory
3400 Spruce St. 7 Maloney S
Philadelphia, PA 19104
tel. (215) 662-3413
On 3/11/2011 4:00 PM, Douglas Bates wrote:
> On Fri, Mar 11, 2011 at 2:32 PM, Michal Figurski
> <figurski at mail.med.upenn.edu> wrote:
>> Dear Prof. Bates,
>
>> I'm working with a lmer model using your lme4 library version 0.999375-35
>> with R 2.11.1 on Win7 64bit. Shortly after starting the function, the R
>> window clears and the following is being displayed:
>>
>> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
>
> ... Hundreds of lines deleted
>
>> REML = TRUE, verbose = 0L)
>> 4: do.call(lmer_finalize, ans)
>> 5: lmer(formula(paste(i1, "~SPL + (SPL|Plate:Aliq)-1")), data = a)
>> Error in mer_finalize(ans) : caught access violation - continue with care
>>>
>
>> OK, so I updated R and lme4 to the latest versions, and now R just plainly
>> crashes without any message. Let me know if you need additional information
>> to troubleshoot.
>
> Well, hundreds, perhaps thousands, of lines of (part of) a dump of an
> object are unlikely to be helpful.
>
> To get R working again you probably need to delete the file .RData in
> the default directory in which you start R. It is most likely that
> you have a corrupt object in the saved worksheet.
>
> Secondly, using paste to create a formula is not a great idea. The
> formula may have ended up being unevaluated. If you really do need to
> use a character string to name the response variable the preferred
> approach is
>
> form<- substitute(foo ~ SPL + (SPL | Plate:Aliq) - 1, list(foo = as.name(i1)))
> lmer(form, data=a)
>
> If those suggestions don't help then please provide a reproducible
> example and preferrably on less than a gigantic data set.
>
> I am taking the liberty of cc:ing the R-SIG-Mixed-Models at R-project.org
> mailing list on this reply. Many of those who read the list may be
> able to help you and it is unlikely I will be able to give much
> assistance soon because I am travelling for the next 10 days.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: crash-example.csv
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20110314/3f03ff7c/attachment-0004.pl>
More information about the R-sig-mixed-models
mailing list