% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/setGlobalOptions.R
\name{[.GlobalOptionsFun}
\alias{[.GlobalOptionsFun}
\alias{dump_opt}
\alias{[[.GlobalOptionsFun}
\alias{[[<-.GlobalOptionsFun}
\alias{names.GlobalOptionsFun}
\alias{.DollarNames.GlobalOptionsFun}
\alias{$.GlobalOptionsFun}
\alias{$<-.GlobalOptionsFun}
\title{Getter and setter functions}
\usage{
\method{[}{GlobalOptionsFun}(x, nm)

dump_opt(x, nm)

\method{[[}{GlobalOptionsFun}(x, nm)

\method{[[}{GlobalOptionsFun}(x, nm) <- value

\method{names}{GlobalOptionsFun}(x)

\method{.DollarNames}{GlobalOptionsFun}(x, pattern = "")

\method{$}{GlobalOptionsFun}(x, nm)

\method{$}{GlobalOptionsFun}(x, nm) <- value
}
\arguments{
\item{x}{The option object returned by [`set_opt()`] or [`setGlobalOptions()`].}

\item{nm}{A single option name.}

\item{value}{The value which is assigned to the option.}

\item{pattern}{Ignore.}
}
\description{
Getter and setter functions
}
\details{
`[` (single bracket) returns a single option object.

`dump_opt()` is identical to `[`.

`[[` (double brackets) returns the value of the option.

The `.DollarNames` method makes the option object looks like a list that it allows option name completion after `$` (by double clicking the "enter/return" key).
}
\examples{
opt = set_opt(a = 1, b = "b")
opt["a"]
opt["b"]
dump_opt(opt, "a")
dump_opt(opt, "b")
opt[["a"]]
opt[["b"]]
opt[["a"]] = 200
opt[["a"]]
names(opt)
opt$a
opt$a = 100
opt$a
}
