Learn R Programming

GlobalOptions (version 0.1.2)

.v: Get value of other options

Description

Get value of other options

Usage

.v(opt_name, name_is_character = NA)

Arguments

opt_name

name of the option, can be quoted or not quoted.

name_is_character

whether opt_name is a character, only used internally.

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

Run this code
# NOT RUN {
opt = set_opt(a = 1, b = function() .v$a*2)
opt$b
opt(a = 2); opt$b
# }

Run the code above in your browser using DataLab