patRoon
patRoon copied to clipboard
Naming of filter function
Hi Rick, I have another issue. I suggest to rename the filter function of patRoon. The naming interferes with the tidyverse filter function and causes errors, if not called explicitly.
Best, Tobias
Hi Tobias,
Renaming filter()
will be quite an involvement and to be honest not something I would like to do in the short term as it will break a lot of existing code and documentation. For now I suggest to prefix function calls with the right package if you want to use both dplyr
and patRoon
, e.g.
dplyr::filter(...)
patRoon::filter(...)
Interestingly, the filter()
function was one of the reasons to start the conflicted R package from the tidyverse
.
Anyway, re-naming filter()
may be worthwhile, as it also masks the original base::filter()
function and there doesn't seem to be a nice way to around it. The function with the new name could of course co-exist for a while with filter() to transition users. Suggestions for a new name are welcome ;-)
Hi Rick, Well, I have no problem to consider, the easiest way would be to update the documentation so long for less experienced users. Just give a hint that there are conflicts and an explicit call is required if dplyr is also loaded. I use tidyverse for data wrangling and thus it is often used in my scripts. I will think about a name.
Best, Tobias
Hi Tobias,
Good point, will mention it in the docs!