From murdoch.duncan at gmail.com  Mon Feb 16 11:38:24 2015
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Mon, 16 Feb 2015 05:38:24 -0500
Subject: [Rd] Imports problem
In-Reply-To: <21729.47401.494559.836260@stat.math.ethz.ch>
References: <1e7ee5$2f7or@ironport10.mayo.edu>
	<21729.47401.494559.836260@stat.math.ethz.ch>
Message-ID: <54E1C8A0.8000601@gmail.com>

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
>



[Rd] Imports problem
Duncan Murdoch