Returns a subset of the current R session options whose names match a given pattern.
Value
A list of matched options, or all options if pattern is ""
. If no
matches are found, returns NULL
(invisibly) and prints a message.
Examples
# all options with "warn" in the name (case-insensitive)
ecokit::extract_options("warn")
#> $nwarnings
#> [1] 50
#>
#> $showWarnCalls
#> [1] FALSE
#>
#> $spam.inefficiencywarning
#> [1] 1e+06
#>
#> $warn
#> [1] 0
#>
#> $warnPartialMatchArgs
#> [1] FALSE
#>
#> $warnPartialMatchAttr
#> [1] FALSE
#>
#> $warnPartialMatchDollar
#> [1] FALSE
#>
#> $warning.length
#> [1] 1000
#>
# options starting with "r" (case-sensitive)
ecokit::extract_options("^r", TRUE)
#> $repos
#> RSPM
#> "https://packagemanager.posit.co/cran/__linux__/noble/latest"
#> CRAN
#> "https://cran.rstudio.com"
#>
#> $rl_word_breaks
#> [1] " \t\n\"\\'`><=%;,|&{()}"
#>
#> $rlang_interactive
#> [1] FALSE
#>
#> $rlang_trace_top_env
#> <environment: 0x55ba00e39f78>
#>