Well, it makes sense to me, since I have had the same issue. Suppose you have two packages A and B. You would really like to import both of them since it is too much work to figure out exactly which functions you use, and you consider both of them fundamental to your own work. So you would like to import(A) import(B) Unfortunately, package A and B has a name conflict, so this results in a warning (or is it note?) from R CMD check. Now, as far as I can see, this means you have to manually figure out which functions you are using from one of the two packages, so you can do import(A) importFrom(B, func1, func2, ...) (you have the choice of A or B here). Since we just have a conflict for a few function, this might be easier written as import(A) importExclude(A, funcHasConflict)
How big of an issue this is, depends on the size of the two packages. Sometimes it is trivial, sometimes it is involved. To the OP: I solved this issue by analyzing my code using getNamespaceFileImports from codetoolsBioC which is a package that is (AFAIK) only avaible from svn at https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/codetoolsBioC Best, Kasper On Fri, Sep 6, 2013 at 8:35 PM, Duncan Murdoch <murdoch.dun...@gmail.com>wrote: > On 13-09-06 4:54 PM, Dr. Peter Ruckdeschel wrote: > >> Hi, >> >> recently R CMD check --as-cran has noticed some more issues with >> package namespace imports with the recommended remedy to >> use importFrom() and friends. >> >> In my case, there was only a conflict restricted to some few imports, >> while I would prefer to still import all the non-conflicting objects, >> methods, and classes of the respective package namespace. >> >> So would it be possible to have some new directives along the lines >> >> import(<pkg>) ## importing the whole namespace of <pkg> in a first step >> notimportFrom(<pkg>, <obj1>, <obj2>,....) >> ## exclude <obj1>, <obj2>, ... again from the previous >> namespace import >> ## and, similarly, >> notimportMethodsFrom(<pkg>, <meth1>, <meth2>,....) >> notimportClassesFrom(<pkg>, <cls1>, <cls2>,....) >> >> in the NAMESPACE file? >> >> Otherwise the list of object, methods, classes to be explicitely imported >> (in my case) got very long (and hence hard to maintain) -- much longer >> than the list of items to be excluded from an import. >> > > This doesn't make sense to me. How could it be easier to maintain a list > over which you don't have control instead of one over which you do have > control? > > Duncan Murdoch > > > > >> Or have I overseen some obvious, easier way to achieve this? >> >> Best regards, Peter >> >> > ______________________________**________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/**listinfo/r-devel<https://stat.ethz.ch/mailman/listinfo/r-devel> > [[alternative HTML version deleted]] ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel