futile.options-package: A scoped options management framework

Description Details Author(s) See Also Examples

Description

The 'futile.options' subsystem provides an easy user-defined options management system that is properly scoped. This means that options created via 'futile.options' are fully self-contained and will not collide with options defined in other packages.

Details

Package: futile.options
Type: Package
Version: 1.0.1
Date: 2018-04-20
License: LGPL-3
LazyLoad: yes

While R provides a useful mechanism for storing and retrieving options, there is a danger that variable names collide with names defined by a package that a user's code depends. These types of errors are difficult to detect and should be avoided. Using 'futile.options' addresses this problem by properly scoping variables within its own custom 'namespace'. This is handled by the 'OptionsManager', which acts as a generator for functions that manage user- defined options.

An added benefit to the package is that default values are automatically supported in the creation of the bespoke options manager.

Author(s)

Brian Lee Yung Rowe <[email protected]>

See Also

OptionsManager

Examples

1
2
3
  my.options <- OptionsManager('my.options', defaults=list(a=1,b=2))
  my.options(a=5, c=3)
  my.options('a')

futile.options documentation built on April 21, 2018, 1:04 a.m.