Using the option setter clears other configured options.
packrat::set_opts(ignored.packages = c("emo"), persist = FALSE)
packrat::opts$snapshot.recommended.packages(TRUE, persist = FALSE)
packrat::get_opts(c("ignored.packages"))
# => NULL
This is using the setter defined by:
|
make_setter <- function(name) { |
|
force(name) |
|
function(x, persist = TRUE) { |
|
if (missing(x)) return(get_opts(name)) |
|
else setOptions(setNames(list(x), name), persist = persist) |
|
} |
|
} |
the setter is connected to the packrat::opts here:
|
opts <- setNames(lapply(names(VALID_OPTIONS), function(x) { |
|
make_setter(x) |
|
}), names(VALID_OPTIONS)) |
Using the option setter clears other configured options.
This is using the setter defined by:
packrat/R/options.R
Lines 173 to 179 in c648ce2
the setter is connected to the
packrat::optshere:packrat/R/options.R
Lines 221 to 223 in c648ce2