amodule: Define Augmented and Parameterized Modules
Description
amodule is a wrapper around module and changes the default
environment to which the module connects. In contrast to module
the top enclosing environment here is always baseenv. The second
important difference is that the environment in which a module is created has
meaning: all objects are made available to the module scope. This is
what is meant by augmented or parameterized. Best practice for
the use of this behavior is to return these modules from functions.
(environment) environment used to detect 'parameters'
enclos
(environment) the top enclosing environment of the module
scope.
class
(character) the module can have a class attribute for
consistency. If you rely on S3 dispatch, e.g. to override the default print
method, you should set this value explicitly.