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

Jeroen Ooms jeroen.ooms at stat.ucla.edu
Sun Aug 10 20:14:33 CEST 2014


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.



More information about the R-devel mailing list