JulienGAMartin / pedtricks

reboot of pedantics R package
https://juliengamartin.github.io/pedtricks/
Other
1 stars 0 forks source link

Changed function names #2

Closed matthewwolak closed 2 months ago

matthewwolak commented 2 months ago

I love changing some of the function names, but wonder if we should use the formal R deprecation methods/functions to better document this. The advantage I see for this is that when someone uses the old familiar function name, they will be given a message saying a new name will need to be used in future. As far as I can see, this notice won't be given unless someone reads carefully in the package documentation.

I've just gone through this over the past year with nadiv e.g., with pin() so think I could make the changes required.

JulienGAMartin commented 2 months ago

I agree that we need to add a formal R deprecation call to document it and let people know.

Great if you can do it. Let me know if you have any problems. I have just made a the old function name an alias of the new one without providing documentation and full support of the older function.

We can just define the new function as calling the deprecated function and then pass the argument to the new function, and still reference it as a deprecated alias I think

JulienGAMartin commented 2 months ago

I implemented it the lazy way without providing the older code or documentation (see commit 01d34f4d90a9aff8b0b75ab9669e566e024fb7fc). The functions are working and provide a warning message of being deprecated. I will close the issue but we can reopen it if you think we need to do it differently

matthewwolak commented 2 months ago

I was about to do this now only to find out you were busy late last night! I think what you did is most sensible. The original functions are documented in pedantics and now we are free to drift/improve into the future. Thanks!