Learn R Programming

optifunset (version 1.0)

options.ifunset: Set Options if Unset

Description

This function will set an option if it isn't already present within the global options returned by the options() function

Usage

options.ifunset(..., force = FALSE)

Arguments

...
any options can be defined, using name = value, if they are not already defined.

Options can also be passed by giving a single unnamed argument which is a named list.

force
Force the Option to Be Set

Examples

Run this code
options.ifunset(width=10)            #IGNORED, ALREADY EXISTS
options.ifunset(width=10,force=TRUE) #FORCED UPDATE TO OPTION
options.ifunset(myoption=TRUE)       #New Option is Created

Run the code above in your browser using DataLab