Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help system in conflicted #19

Open
RobinHankin opened this issue Aug 23, 2018 · 3 comments
Open

help system in conflicted #19

RobinHankin opened this issue Aug 23, 2018 · 3 comments
Labels
feature a feature request or enhancement

Comments

@RobinHankin
Copy link

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?

@hadley
Copy link
Member

hadley commented Aug 23, 2018

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.

@jtelleria
Copy link

jtelleria commented Jan 24, 2019

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

@RobinHankin
Copy link
Author

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? ~~~~

@hadley hadley added the feature a feature request or enhancement label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants