Steffen Wagner
2016-Oct-27 09:26 UTC
[Rd] enhancement to R CMD check: do imported objects from multiple packages mask each other?
Dear R-Developement Team, I want to suggest an additiol check to the R CMD check functionality. Consider the situation where the objects of more than one package are imported to the NAMESPACE of a third package, e.g. via import(foo, bar) in the NAMESPACE file. There might be situations where exported objects in the packages `foo` and `bar` have the same name, let?s say there is an object `f` exported from both packages. Then a warning created by R CMD check comparable to the same situation when attaching multiple packages to the search path, like> library(foo) > library(bar)The following objects are masked from ?package:foo?: f would be very helpful. I am aware that it is not best practice to import many packages with many exported objects to the NAMESPACE of another package. Nevertheless it would be nice feature to be warned about the resulting name conflict. Thanks in advance. Steffen -- INWT Statistics GmbH Obentrautstra?e 72 10963 Berlin Fon +49 30 609857995 Fax +49 30 609857998 E-Mail steffen.wagner at inwt-statistics.de www.inwt-statistics.de Sitz der Gesellschaft: Berlin-Kreuzberg AG Berlin-Charlottenburg, HRB 133141 B Gesch?ftsf?hrer: Dr. Amit Ghosh
Duncan Murdoch
2016-Oct-27 12:17 UTC
[Rd] enhancement to R CMD check: do imported objects from multiple packages mask each other?
On 27/10/2016 5:26 AM, Steffen Wagner wrote:> Dear R-Developement Team, > > I want to suggest an additiol check to the R CMD check functionality. > > Consider the situation where the objects of more than one package are > imported to the NAMESPACE of a third package, e.g. via > > import(foo, bar) > > in the NAMESPACE file. > > There might be situations where exported objects in the packages `foo` > and `bar` have the same name, let?s say there is an object `f` > exported from both packages. > > Then a warning created by R CMD check comparable to the same situation > when attaching multiple packages to the search path, like > > > library(foo) > > library(bar) > The following objects are masked from ?package:foo?: > > f > > > would be very helpful. > > I am aware that it is not best practice to import many packages with > many exported objects to the NAMESPACE of another package. > Nevertheless it would be nice feature to be warned about the resulting > name conflict.That sounds like a reasonable suggestion. However, unless someone volunteers to do it very quickly, it will likely get lost in the archives of this list and forgotten. Could you please post it to the bug list as an enhancement request? Those should be persistent. If you have never posted to the bug list you will need to be manually added to the list of people allowed to post. In that case, write to me and I'll do it. Duncan Murdoch
Hervé Pagès
2016-Oct-27 15:58 UTC
[Rd] enhancement to R CMD check: do imported objects from multiple packages mask each other?
Hi Duncan, On 10/27/2016 05:17 AM, Duncan Murdoch wrote: [...]> Could you please post it to the bug list as an enhancement request? > Those should be persistent. > > If you have never posted to the bug list you will need to be manually > added to the list of people allowed to post. In that case, write to me > and I'll do it.Sorry to ask such a naive question but is there a bug list or do you mean the Bugzilla bug tracker? Thanks, H. -- Herv? Pag?s Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M1-B514 P.O. Box 19024 Seattle, WA 98109-1024 E-mail: hpages at fredhutch.org Phone: (206) 667-5791 Fax: (206) 667-1319
Maybe Matching Threads
- as.list method for by Objects
- selectMethod() can fail to find methods in situations of multiple dispatch
- selectMethod() can fail to find methods in situations of multiple dispatch
- binary form of is() contradicts its unary form
- making object.size() more meaningful on environments?