On 23/06/2020 4:22 a.m., Guido Schwarzer wrote:
Am 23.06.20 um 10:00 schrieb Viechtbauer, Wolfgang (SP):
[...]
@Neal: A separate package with generic functions that pkgA and pkgB could 
import is an interesting suggestion, thanks!

What makes this interesting is that there is no dependency on other
packages in generics.

Remains the question which help page would be shown for help(foo).

If a package imports and then exports the generic, it would normally create a help page referring to the original one where the generic is defined. So both pkgA and pkgB would probably both create help pages, and the help system would show a page listing them both plus the generic one, and asking the user to choose.

An example happens if you use

library(broom)
?tidy

The broom package links to a page that says "These objects are imported from other packages. Follow the links below to see their documentation."
One of the links is to the ?tidy page in the generics package.

You are allowed to say ?broom::tidy, and then you don't go to the list of possibilities, you go directly to the one you asked for.

Duncan Murdoch

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

Reply via email to