[Rd] clarification on import/depends for a method
Hadley Wickham
h.wickham at gmail.com
Mon Mar 2 19:58:42 CET 2015
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/
More information about the R-devel
mailing list