harrelfe / Hmisc

Harrell Miscellaneous
Other
210 stars 81 forks source link

do not export 'recode' #1

Open rubenarslan opened 10 years ago

rubenarslan commented 10 years ago

If recode is an internal, undocumented function in Hmisc as it appears to be, it shouldn't be exported, especially considering it overwrites the more widely used car::recode. E.g. http://stackoverflow.com/questions/9337716/how-do-i-use-functions-in-one-r-package-masked-by-another-package https://stat.ethz.ch/pipermail/r-help/2010-June/242466.html

harrelfe commented 10 years ago

recode is not an internal function, and is exported by Hmisc, 15 years before the existence of car. The bigger question is whether anyone is still using Hmisc's recode, i.e., whether it should stay in the package.

rubenarslan commented 10 years ago

Since it's undocumented and bringing up its help dialog gives us "These are not to be called by the user or are undocumented." I doubt many casual users dare use it.

harrelfe commented 10 years ago

Good point; didn't remember I had never written a help file. Will remove from the package for the next version.

rubenarslan commented 10 years ago

Thanks! This was my first R gotcha and it still trips me up sometimes :-)

On 05 Dec 2013, at 17:58, Frank Harrell notifications@github.com wrote:

Good point; didn't remember I had never written a help file. Will remove from the package for the next version.

— Reply to this email directly or view it on GitHub.

bbbruce commented 10 years ago

I do use it directly (usually with Hmisc:::recode after loading car second) and its disappearance bit my legacy code today. Found it in the prior code (https://github.com/harrelfe/Hmisc/blob/3cf7fce26cc1bf9728fdfc67164b5e24bf6bb7bc/R/recode.s) - agree that removing it (or renaming it) is probably best because it clashes with car so often even though you came first!

harrelfe commented 10 years ago

The removal of this function was announced earlier in the NEWS file.
You can find it in older versions of the package or I can send it to you if needed. Frank

On 09/09/2014 08:46 AM, Beau Bruce wrote:

I do use it directly (usually with Hmisc:::recode after loading car second) and its disappearance bit my legacy code today. Will find it in the prior code...

— Reply to this email directly or view it on GitHub https://github.com/harrelfe/Hmisc/issues/1#issuecomment-54970821.


Frank E Harrell Jr Professor and Chairman School of Medicine

Department of *Biostatistics*   *Vanderbilt University*
bbbruce commented 10 years ago

Thanks - I found it - just commented since the issue was still open (even though I gather it is closed - in a fashion I agree with). Thanks for your help - I love Hmisc and rms.