How to get package and function together with code completion in RStudio?

This would be handy for conflicting functions, and more generally to systematically include the package for debugging purpose or communicating the code to others. Having to write down the package manually is time consuming and could be avoided with code completion.

this question has 2 parts:

1) How to include masked functions in the completion pop-up menu ?


x magrittr::set_names() masks purrr::set_names()

while typing set_n in the text editor and tab, we only see the unmasked function magrittr::set_names() in the completion menu. I'd like to be able to pick the one I need from the menu.

2) How to get code completion to write down both package::function() ?


for magrittr::set_names() when tabbing twice set_n in the text editor, code completion only writes down the function set_names() . I'd like to get completion to write down the full designation magrittr::set_names() .

As far as I know, the answer to how can you do these things is that you can't, as the software doesn't presently support that.
You could raise a feature request as an issue on

1 Like

thank you, I've raised the feature request.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.