[Rd] Problems when moving to Imports from Depends

Paul Gilbert pgilbert902 at gmail.com
Sat Sep 28 00:36:13 CEST 2013



On 13-09-27 06:05 PM, Peter Langfelder wrote:
> On Fri, Sep 27, 2013 at 2:50 PM, Kasper Daniel Hansen
> <kasperdanielhansen at gmail.com> wrote:
>> Peter,
>>
>> This is a relatively "new" warning from R CMD check (for some definition of
>> new).  The authors of Hmisc have clearly not yet gone through the process of
>> cleaning it up, as you are doing right now (and there are many other
>> packages that still need to address this, including several of mine).  Given
>> who the authors are of Hmisc, I would suggest writing to them and ask them
>> to look into this, and ask for a time estimate.
>
> thanks for the suggestion, but I must be missing something: since
> Hmisc imports survival (as well as Depends: on it), what can Hmisc
> change to make the survival functionality visible to my package?

The terminology around "imports" has had many of us confused. (My copy 
of) Hmisc has survival in both Imports: and Depends: in the DESCRIPTION 
file (for which they will now be getting flagged) but it does not have 
it in the NAMSPACE file, which it needs, whether it is in Depends: or 
Imports: (and for which they are getting another flag). When this is 
fixed then the Hmisc function rcorr.cens will look at its own NAMSPACE 
determined path for finding functions, and find is.Surv. As Kasper 
pointed out, this is not really your problem, except of course that you 
need to work around the Hmisc problem. Until Hmisc is fixed, I think you 
have the option of adding survival to Depends:, or leaving Hmisc in 
Depends:. (I would be inclined to leave it the way you had it until 
packages further down the chain are fixed.)

Paul

>
>>
>> In the meantime, you may have to do something about this, and whatever you
>> do I would suggest following the Hmisc package and undo it as soon as
>> possible, as the right thing is to fix Hmisc.  Having said that, it is not
>> clear to me that you can easily solve this yourself, because I don't think
>> that putting survival into your own imports will make the package available
>> to Hmisc functions, but it is not impossible there is some way around it.
>
> Well, as I said, things work fine if I leave Hmisc in the Depends:
> field, which, however, is against CRAN policy. The trouble is that I
> don't have a good way of checking whether something breaks by moving a
> package from Depends into Imports...
>
> Peter
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list