[R] restrictions for attribute access <Watchdog: Virus checked>
wwwhsd at gmail.com
Wed Apr 2 13:34:43 CEST 2008
tab <- smry at AICtab
On Wed, Apr 2, 2008 at 7:59 AM, Benjamin Polak <benjamin.polak at unisg.ch> wrote:
> Hello everybody,
> I have a problem with accessing class attributes. I think it might be
> due to namespace access restrictions or something similar, but I'm
> unable to figure it out, maybe someone knows the trick how to do
> it ...
> I'm trying to extract some information from the summary object for a
> model fitted using the lmer function from the lme4 package:
> smry <- summary(lmer(foo ~ bar ...))
> tab <- attr(smry, "AICtab")
> When I run this code as a regular R script everything works fine,
> tab$AIC has the desired value. But when I try to run this code from
> within a package I wrote, tab$AIC is NULL.
> I've tried adding "import(lme4)", "importClassesFrom(lme4)"
> and "importMethodsFrom(lme4)" into the NAMESPACE file of my package,
> but it didn't help, tab$AIC is still NULL.
> Thanks for any kind of hint!
> Best Regards,
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
25° 25' 40" S 49° 16' 22" O
More information about the R-help