-
Notifications
You must be signed in to change notification settings - Fork 233
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
Refclass and R6 methods should generate aliases #1042
Comments
Yeah, it would be great to have a way to get to the documentation of the methods quicker! However, one issue with adding the aliases, is R6 methods often have short, concise names, e.g. I couple I have just seen in the wild are You can always add an alias manually, with I think ideally the help system and the ?remoteDriver$findElement In HTML help (like RStudio, RGui, etc.) it could even jump to the definition of the method, as roxygen adds HTML anchors already. |
Sorry, I made a mistake in posting this question: Yes, an R solution would be even better. It could do more than Regarding the use of short names as method names: the R help system has a way to disambiguate such things when they are in different packages. It currently allows the same alias to be used on multiple help topics in the same package, but doesn't handle them well: it seems to display the first topic it finds, it doesn't bring up the list of all possible matches. So I think you're right, with current R automatically adding a |
Actually, if the help page does not scroll to the right method, then adding an alias to
if we patch |
I'm thinking of a case where I was looking through some old code that I wrote (looking through someone else's code would be similar). I saw things like
in the code, and wanted to read the docs for |
Right, that's a good point. It seems that if we add an alias for |
It might be more beneficial to add method names as |
Any development on this issue? I work with R6 classes containing long list of methods with realtively large number of arguments. So, a quicker link to a specific method help section by ?ClassName$methodName or ?obj$methodName would really ease the user experience with R6. |
I posted an issue for RSelenium, suggesting that
?findElement
should open the?remoteDriver
web page. But really this is aroxygen2
suggestion: when it generates the big help page for the R6 class, it should add aliases for all the methods described in it (and maybe for the fields, too). This would address the problem raised in issue #1039 as well, because a standard Rd link could be used.It might make sense to also add an alias that included the class name.
That is, in order to find the help for the
findElement
method, I could do eitheror
(or some other syntax for the last one).
The text was updated successfully, but these errors were encountered: