[R] Accidentally replacing core R functions

MacQueen, Don macqueen1 at llnl.gov
Mon Aug 5 19:33:35 CEST 2013


One could get in the habit of typing
   conflicts()
from time to time.

Or perhaps
   conflicts(,TRUE)$.GlobalEnv

Various ways of semi-automating this come to mind, such as putting it in
one's .Rprofile file.

-Don

-- 
Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062





On 8/3/13 12:47 AM, "Rguy" <rguy at 123mail.org> wrote:

>I sometimes find that a function I have defined has the same name as an R
>core function. In most cases I have no desire to redefine the core R
>function and would prefer to give my function a different name.
>
>The problem is that R lets users redefine its core functions without any
>warning. Is there a way to cause R to generate a warning if a core
>function
>is being redefined?
>
>To give an actual example, in my personal library of functions I have a
>'seek' function. I recently noticed that seek(con, ...) is part of base R.
>Now I plan to rename my personal 'seek' function but would have benefited
>from a warning when I first created this function.
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list