Removes options from the current R session by name or regular expression pattern.
Examples
# removes option named "my_option"
options(my_option = 42)
ecokit::extract_options("my_option")
#> $my_option
#> [1] 42
#>
ecokit::remove_options("my_option")
ecokit::extract_options("my_option")
#> No options found with the specified pattern
options(plot1 = 42, plot2 = "yes", plot_extra = TRUE)
ecokit::remove_options("plot_", regex = FALSE)
ecokit::extract_options("plot")
#> $plot1
#> [1] 42
#>
#> $plot2
#> [1] "yes"
#>
#> $plot_extra
#> [1] TRUE
#>
ecokit::remove_options("plot_", regex = TRUE)
ecokit::extract_options("plot")
#> $plot1
#> [1] 42
#>
#> $plot2
#> [1] "yes"
#>