From bbolker at gmail.com  Thu Mar 24 20:12:55 2011
From: bbolker at gmail.com (Ben Bolker)
Date: Thu, 24 Mar 2011 15:12:55 -0400
Subject: [Rd] import question
In-Reply-To: <AANLkTikV_RHGTMgZjizwv7xNGyQpJQFR=P7w9swKTk2W@mail.gmail.com>
References: <4D8A85F4.1070507@gmail.com>
	<loom.20110324T011932-297@post.gmane.org>
	<AANLkTikV_RHGTMgZjizwv7xNGyQpJQFR=P7w9swKTk2W@mail.gmail.com>
Message-ID: <4D8B97B7.6030000@gmail.com>

On 03/24/2011 03:03 PM, Hadley Wickham wrote:
> On Wed, Mar 23, 2011 at 7:20 PM, Ben Bolker <bbolker at gmail.com> wrote:
>> Ben Bolker <bbolker <at> gmail.com> writes:
>>
>>>
>>>
>>>   I have been struggling all day to import a particular function/method
>>> combination (ranef(), which extracts the random effects from a mixed
>>> model fit) from the nlme package into another package ... so far without
>>> success.
>>>
>>
>>  Answered my own question, finally.
>>
>>  Apparently an explicit
>>
>> export(ranef)
> 
> But why do you want to export this method out of your package? (If you
> export it, you will need to document it) Can't you rely on nlme being
> loaded?
> 
> i.e. your test should be
> 
> library(nlme)
> library(raneftest)
> x <- 1
> class(x) <- "x"
> ranef.x(x)
> ranef(x)
>

  nlme and lme4 do not play nicely together (this may be
fixable/eventually be fixed, but it's the current state of affairs), and
I want this package to interoperate with lme4.  Thus I want to avoid
explicitly loading nlme.
  Sorry I didn't make this clear initially (someone else asked about
this off-list).


  cheers
    Ben



[Rd] import question
Ben Bolker