From jeroen.ooms at stat.ucla.edu  Sun Aug 10 20:14:33 2014
From: jeroen.ooms at stat.ucla.edu (Jeroen Ooms)
Date: Sun, 10 Aug 2014 20:14:33 +0200
Subject: [Rd] How to redefine `require' to generate a warning and
 delegate work to the original require?
In-Reply-To: <CAAjq1md_zS1JUDp1-OM2dUwHWm6fDedOe1Eq9uwyFTRy8F-UUw@mail.gmail.com>
References: <CAAjq1md_zS1JUDp1-OM2dUwHWm6fDedOe1Eq9uwyFTRy8F-UUw@mail.gmail.com>
Message-ID: <CABFfbXsA5THxJXfN=+m6wW=F8WRsWjhvP4LzM_tm1UFb3mW=Yw@mail.gmail.com>

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?
Jeroen Ooms