tidylog icon indicating copy to clipboard operation
tidylog copied to clipboard

Tidylog function masking using `...` means RStudio auto-complete and function definition help is not available.

Open orgadish opened this issue 3 years ago • 1 comments

tidylog has been hugely helpful for me in my data analysis workflows (thank you!). However, its masking of tidyr and dplyr functions using ... notation means that I can no longer use RStudio auto-complete for function arguments, or hover over the function name to see the arguments.

I used to use this all the time with pivot_wider and pivot_longer where I always forget names_to vs names_from, for example. Now in order to do this I have to explicitly type tidyr::pivot_wider( to start the autocomplete or search for the help.

Is there a way to perform the masking without replacing the help functionality?

orgadish avatar Nov 01 '21 22:11 orgadish

This came up before: #44. Unfortunately, I don't think there is a good solution for this. Tidylog could copy over the complete function signature from dplyr/tidyr, but that would be a nightmare to maintain.

elbersb avatar Nov 02 '21 09:11 elbersb

What would you think about copying the signature specifically for pivot_wider and pivot_longer as I think those are the ones which I would use the most. I would happily submit the PR for that (should be trivial).

orgadish avatar Sep 25 '23 04:09 orgadish

The problem with that approach is that if the signature of these functions ever changes, then the tidylog signature might be different from the signature that is actually in the function - and that would be a big mess. So unfortunately I still don't really have a good idea of how to solve this.

elbersb avatar Sep 26 '23 12:09 elbersb