Skip to contents

Get other option values

Usage

.v(opt_name, name_is_character = NA)

# S3 method for class 'InternalOptionValue'
x$nm

Arguments

opt_name

The option name.

name_is_character

Please ignore, only used internally.

x

should always be written as .v.

nm

The option name.

Details

When setting one option, the value can be dependent on other option names. The current value of other option can be accessed by .v(nm) or .v$nm.

Examples

opt = set_opt(a = 1, b = function() .v$a*2)
opt$b
#> [1] 2
opt(a = 2); opt$b
#> [1] 4
opt(a = 4); opt$b
#> [1] 8
reset_opt(opt); opt$b
#> [1] 2