From h.wickham at gmail.com  Mon Mar  2 19:58:42 2015
From: h.wickham at gmail.com (Hadley Wickham)
Date: Mon, 2 Mar 2015 12:58:42 -0600
Subject: [Rd] clarification on import/depends for a method
In-Reply-To: <1e7ee5$5ak42@ironport10.mayo.edu>
References: <1e7ee5$5ak42@ironport10.mayo.edu>
Message-ID: <CABdHhvFV2-hnS6UG7HY3xauzZLAC=NtMJd3us-N1Tg0XsZhA+A@mail.gmail.com>

That makes sense to me.
Hadley

On Mon, Mar 2, 2015 at 8:45 AM, Therneau, Terry M., Ph.D.
<therneau at mayo.edu> wrote:
> User of the coxme library (mixed effects Cox models) are instructed to use
> ranef(), fixed(), VarCorr(), etc to retrieve bits out of a fitted model; it
> purposely uses the same methods as nlme and/or lmer.
>
> The current behavior is to "depend" on nlme.  If I defined the methods
> myself in coxme, then someone who had both nlme and coxme loaded will suffer
> from "last loaded wins", and the methods for one or the other are not found.
> I'm willing to update this but want to get it right.  The import(nlme) +
> nlme::ranef(fit) solution is not appealing.  I don't mind putting :: in my
> source code, but users of the package should not be forced into this.
>
> Is the correct current solution (using ranef as an example)
>    importFrom(nlme, ranef)
>    export(ranef)
>
> then use promptImport() to create a manual page?
>
>
> If users always had only one of coxme, lmer, or nlme loaded in any given
> session then there are multiple solutions, but occassionally one wants both
> linear and Cox mixed effects.
>
> Terry T.
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



-- 
http://had.co.nz/



[Rd] clarification on import/depends for a method
Hadley Wickham