
Last chance! 50% off unlimited learning
Sale ends in
attributes
of the new settings in new
are
checked for consistency with the model (often default)
list in name.opt
.
check.options(new, name.opt, reset = FALSE, assign.opt = FALSE, envir = .GlobalEnv, check.attributes = c("mode", "length"), override.check = FALSE)
TRUE
, reset the options from
name.opt
. If there is more than one R object with name
name.opt
, remove the first one in the search()
path.TRUE
, assign the ...environment
used for get
and assign
.check.options
should check.length(new)
(or 1
which entails recycling).
For those new[i]
where override.check[i] == TRUE
, the
checks are overridden and the changes made anyway.name.opt
.
The values of the components are changed from the new
list,
as long as these pass the checks (when these are not overridden
according to override.check
).
ps.options
and pdf.options
,
which use check.options
.
(L1 <- list(a = 1:3, b = pi, ch = "CH"))
check.options(list(a = 0:2), name.opt = "L1")
check.options(NULL, reset = TRUE, name.opt = "L1")
Run the code above in your browser using DataLab