From gcr at wisdomandwonder.com  Sun Aug 10 20:57:04 2014
From: gcr at wisdomandwonder.com (Grant Rettke)
Date: Sun, 10 Aug 2014 13:57:04 -0500
Subject: [Rd] How to redefine `require' to generate a warning and
 delegate work to the original require?
In-Reply-To: <CABFfbXsA5THxJXfN=+m6wW=F8WRsWjhvP4LzM_tm1UFb3mW=Yw@mail.gmail.com>
References: <CAAjq1md_zS1JUDp1-OM2dUwHWm6fDedOe1Eq9uwyFTRy8F-UUw@mail.gmail.com>
	<CABFfbXsA5THxJXfN=+m6wW=F8WRsWjhvP4LzM_tm1UFb3mW=Yw@mail.gmail.com>
Message-ID: <CAAjq1mdY5eWS-9ASHLxWBgW=ohj5CxkLpHs_OTMWR7hAh-8cbQ@mail.gmail.com>

Jeroen, my sincere apologies.

Having read http://www.r-project.org/posting-guide.html I had
determined that my question was specifically "discussion about code
development in R" and was not in the realm of those who "want to use R
to solve problems but who are not necessarily interested in or
knowledgeable about programming".

As such, I posted it here.

Where did I go wrong?

Thanks for letting me know on both parts and have a great day.
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
gcr at wisdomandwonder.com | http://www.wisdomandwonder.com/
?Wisdom begins in wonder.? --Socrates
((? (x) (x x)) (? (x) (x x)))
?Life has become immeasurably better since I have been forced to stop
taking it seriously.? --Thompson


On Sun, Aug 10, 2014 at 1:14 PM, Jeroen Ooms <jeroen.ooms at stat.ucla.edu> wrote:
> On Sun, Aug 10, 2014 at 7:22 PM, Grant Rettke <gcr at wisdomandwonder.com> wrote:
>>
>> ? Error in gcr$original.require(...) <- require :
>> ?   '...' used in an incorrect context
>
> I think you mean: gcr$original.require <- base::require. You don't
> need the parentheses since you are not defining or calling a function.
> You are simply assigning an object to another environment.
>
> Basic questions about R usage/syntax like these are better suited for
> the r-help list or stack-overflow. Have a look at:
> https://stat.ethz.ch/mailman/listinfo/r-devel.



[Rd] How to redefine `require' to generate a warning and delegate work to the original require?
Grant Rettke