This function is inspired by
withr::with_options
: it can be used to
execute some code where package options are temporarily changed. This
function uses a shortened syntax, especially when changing options for
patRoon
.
withOpt(code, ..., prefix = "patRoon.")
if (FALSE) { # \dontrun{
# Set max parallel processes to five while performing formula calculations
withOpt(MP.maxProcs = 5, {
formulas <- generateFormulas(fGroups, "genform", ...)
})
} # }