From therneau at mayo.edu  Mon Mar  2 15:45:39 2015
From: therneau at mayo.edu (Therneau, Terry M., Ph.D.)
Date: Mon, 02 Mar 2015 08:45:39 -0600
Subject: [Rd] clarification on import/depends for a method
Message-ID: <1e7ee5$5ak42@ironport10.mayo.edu>

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.



[Rd] clarification on import/depends for a method
Therneau, Terry M., Ph.D.