[Rd] import question

Hadley Wickham hadley at rice.edu
Thu Mar 24 20:03:18 CET 2011


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)


Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



More information about the R-devel mailing list