help system in conflicted
Great package! I am the author of the elliptic package,
https://github.com/RobinHankin/elliptic.git
The package defines a function sd() which is one of a systematic set of functions with names such as sn(), ds(), ss() and so on which means that the name sd() is unalterable. So this creates an unavoidable conflict with base::sd(). What I would like is to have an option to make the help system respect the conflict resolution:
R % R --vanilla --quiet
> library(conflicted)
> library(elliptic)
> conflict_prefer("sd","elliptic")
[conflicted] Will prefer elliptic::sd over any other package
> ?sd
Help on topic ‘sd’ was found in the following packages:
Package Library
stats
/Library/Frameworks/R.framework/Versions/3.5/Resources/library
elliptic /Users/rhankin/Library/R/3.5/library
I don't like to have to choose which option I want here: I want to go
directly to the elliptic::sd helppage. Is this possible?
Oh yes, this is a nice idea. It would require shimming ? (which will be a little tricky to be compatible with devtools), but it's certainly doable.
Well... But ?sd also is a fast way to know which are the package environment functions which are in conflict...
So it is only one click away to access the help page for ?sd with conflict_prefer("sd","elliptic") function...
I guess a single click isn't too onerous, especially as the help system is only ever fired up in interactive mode (?). Perhaps a good compromise might be to type ?sd and get a warning that there is a conflict, then fire up the preferred help? ~~~~