[R-SIG-Mac] lmer cannot find functions

Reinhold Kliegl reinhold.kliegl at gmail.com
Sun May 14 00:32:33 CEST 2006


Dear Martin Maechler,

I did use library(Matrix) and library(lme4). I used lmer.R only in so
far as I extracted the "lmerControl" function (and subsequently the
"subbars" function) from this file to see where lmer would go if these
functions are provided by me.

The problem went away when I deleted .RData files from home or working
directories (or started R with the -- no-restore option). So I suspect
that these files did not get removed (or updated) when I upgraded from
2.2.1 to 2.3.0.  This could be a MacOS X problem or a R problem or –
most likely – my problem.

Please let me know if you think further clarification would be useful.

Best
Reinhold


On 5/13/06, Martin Maechler <maechler at stat.math.ethz.ch> wrote:
> >>>>> "Reinhold" == Reinhold Kliegl <reinhold.kliegl at gmail.com>
> >>>>>     on Sat, 13 May 2006 11:57:46 +0200 writes:
>
>     Reinhold> Hi, I have a problem accessing "lmer.R" from the
>     Reinhold> Matrix package 0.995-10 on a MacBook Pro after
>     Reinhold> upgrading to 2.3.0.
>
>     >> (fm1 <- lmer(Reaction ~ Days + (Days|Subject),
>     >> sleepstudy))
>     Reinhold> Error in do.call("lmerControl", control) : could
>     Reinhold> not find function "lmerControl"
>
> Hmm, did you really work with the 'lmer.R' source file instead
> of just
>    library(lme4)
> or library(Matrix)  ?
>
> Since Matrix has a name space -- as many other "modern" R
> packages, you cannot just work with one (out of many) R source
> files from the package.
> If really want to use some of the package R source files,
> you better use them all.
> If you use
>    example(source)
> in R 2.3.0 ("or newer"),
> you can subsequently use   sourceDir("..../Matrix/R")
>
> Note that if this answer has been helpful,
> it means that your problem has not been related to "Mac" at all,
> and you should rather have used the 'R-help' mailing list.
>
> Can you confirm?
> Regards,
> Martin Maechler, ETH Zurich
>
>
>
>     Reinhold> When I define the "lmerControl" function contained
>     Reinhold> in "lmer.R" directly, the program stops at
>     Reinhold> "subbars" which is the next function in "lmer.R".
>     Reinhold> So obviously, my new installation does not work
>     Reinhold> properly.
>
>     >> (fm1 <- lmer(Reaction ~ Days + (Days|Subject),
>     >> sleepstudy))
>     Reinhold> Error in lmer(Reaction ~ Days + (Days | Subject),
>     Reinhold> sleepstudy) : could not find function "subbars"
>
>     Reinhold> I use the following setup which I compiled with
>     Reinhold> gcc4.0.3.  Version 2.3.0 Patched (2006-05-11
>     Reinhold> r38037) i386-apple-darwin8.6.1
>
>     Reinhold> attached base packages: [1] "methods" "stats"
>     Reinhold> "graphics" "grDevices" "utils" "datasets" "base"
>
>     Reinhold> other attached packages: lme4 lattice Matrix
>     Reinhold> "0.995-2" "0.13-8" "0.995-10"
>
>     Reinhold> I have not run into any problems with other
>     Reinhold> packages (e.g., installed automatically along with
>     Reinhold> R, e.g., nlme, or by myself, e.g., HMisc).
>
>     Reinhold> I had "lmer" working fine on this machine before I
>     Reinhold> upgraded to 2.3.0, but I get the same error when I
>     Reinhold> go back to the 2..2.1 (universal binary) now.
>
>     Reinhold> I also get the same error after installing "Matrix
>     Reinhold> 0.995-8".
>
>     Reinhold> lmer works fine on another Macintosh G5 machine
>     Reinhold> which I did not upgrade (R-version 2.2.1,
>     Reinhold> powerpc-apple-darwin7.9.0, Matrix 0.995-4)
>
>     Reinhold> Thank you for your attention.
>
>     Reinhold> Best Reinhold
>
>     Reinhold> ---- Reinhold Kliegl Dept. of Psychology,
>     Reinhold> University of Potsdam PO Box 601553, 14415
>     Reinhold> Potsdam, Germany phone: +493319772868, fax:
>     Reinhold> +493319772793
>     Reinhold> http://www.psych.uni-potsdam.de/people/kliegl/
>



More information about the R-SIG-Mac mailing list