mkoptions {pkgmaker}R Documentation

Quick Option-like Feature

Description

mkoptions is a function that returns a function that behaves like options, with an attached internal/local list of key-value pairs.

Usage

mkoptions(...)

.options(..., .DATA)

Arguments

...

list of keys or key-value pairs. For mkoptions these define inital/default key-value pairs.

.DATA

a list or an environment with an element .options.

Value

mkoptions returns a function.

Functions

See Also

setupPackageOptions

Examples

f <- mkoptions(a=3, b=list(1,2,3))
str(f())
f('a')
f('b')
str(old <- f(a = 10))
str(f())
f(old)
str(f())


[Package pkgmaker version 0.32.10 Index]