Learn R Programming

zephyr (version 0.1.2)

create_option: Create package option

Description

Use inside your package to setup a zephyr_option that you can use in your functions with get_option(). The specification is stored inside the environment of your package.

For more information and how to get started see use_zephyr().

Usage

create_option(name, default, description = name, .envir = parent.frame())

Value

Invisible zephyr_option object

Arguments

name

[character(1)] Name of the option

default

[any] Default value of the option

description

[character(1)] Description of the option

.envir

Environment in which the option is defined. Default is suitable for use inside your package.

Examples

Run this code
if (FALSE) {
create_option(
  name = "answer",
  default = 42,
  description = "This is supposed to be the question"
)
}

Run the code above in your browser using DataLab