On Sat, Sep 28, 2013 at 12:05 AM, Peter Langfelder <
peter.langfel...@gmail.com> wrote:

> On Fri, Sep 27, 2013 at 2:50 PM, Kasper Daniel Hansen
> <kasperdanielhan...@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?


I have not looked at Hmisc.  But the actual import is decided by whatever
is stated in the NAMESPACE file. All of survivial is not imported just
because Hmisc is listed in the Imports: field in DESCRIPTION.  As you
describe what happens, I can only conclude it is an issue with Hmisc: you
say an imported Hmisc function does not work.  That is not your issue, that
is automatically an Hmisc issue (and exactly the reason for why we all have
to fix this in our packages).


> > 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...
>

Here you seem slightly confused.  You can of course put Hmisc in Depends
(and not in imports).  But if you do this, you need still to use
appropriate statements importing functions from Hmisc in the NAMESPACE
file. The difference between having Hmisc in Depends or Imports has
(roughly) to do with what happens when you write
> library(YOURPACKAGE)
at the command line.

What R CMD check now says is that you need to have an appropriately
constructed NAMESPACE file, both if the package is in Depends and if it is
in Imports (and it cannot be in both).  Actually, in practice the NAMESPACE
file is probably going to be the same no matter what you do with
Depends/Imports.  It used to be that package authors good get away with
putting a package in Depends and not construct relevant import statements
in the NAMESPACE file.  Of course this is a simplified exposition.

Best,
Kasper

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to