[Rd] Imports problem

Duncan Murdoch murdoch.duncan at gmail.com
Mon Feb 16 11:38:24 CET 2015


On 16/02/2015 4:32 AM, Martin Maechler wrote:
>>>>>> Therneau, Terry M , Ph D <therneau at mayo.edu>
>>>>>>     on Sun, 15 Feb 2015 17:31:00 -0600 writes:
> 
>     > I'm testing out a new version of coxme and R CMD check fails with "could not find function 
>     > ranef" (or random.effects or fixef, or anything from nlme).  The NAMESPACE file has the 
>     > line below
> 
>     > importFrom(nlme, ranef, random.effects, fixef, fixed.effects, VarCorr)
> 
>     > and nlme is declared in the DESCRIPTION file as an import.  I feel that I must be staring 
>     > at some obvious (but invisible to me) mistake. 
> 
> are you using them in (help page) examples, demos, or vignettes
> ?
> 
> In that case, as you no longer 'Depend' on lme4, you need a 
>  require(lme4)
> before the corresponding code.

Or use it with the prefix, lme4::ranef.  This is somewhat preferred, as
it doesn't modify the user's search list.

Duncan Murdoch

> 
>     >  Users are very likely to use "ranef" as well.
> 
> Well, and you are sure that you do not want them to see the help
> file for ranef() ?
> 
> If a user of coxme() should typically use ranef() in her own code,
> you should rather *depend* on lme4 than only *import* it.
> 
>     > Second question.  The files now declare bdsmatrix as an import rather than a depends.  If 
>     > one of my test files has an explicit call to a bdsmatrix function, I assume that I will 
>     > need to put an explicit "require" there.
> 
> Sure.  See above
> 
>     > Third: How should "methods" be listed?  I'm getting a message from CMD check if I leave it 
>     > in or leave it out.
> 
> this is not precise enough for me to help, rather we need exact details.
> 
>     > An update to the survival package is forcing an update to one of the tests in coxme (the 
>     > "rats" data set in survival now has both male and female, prompted by a user, but the test 
>     > assumed the old version with only female).  An update of the include vs update material 
>     > seemed in order as well.
> 
> ??? {"nix verstahn"  we'd say here}
> 
>     > Terry Therneau
> 
> Martin Maechler
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list