spsOption {spsUtil} | R Documentation |
Get or set SPS options
Description
Some functions in spsUtil, spsComps and systempPipeShiny will behave differently if some SPS options are changed, but it is optional. All functions have a default value. If SPS options are not changed, they will just use the default setting. Read help files of individual functions for detail.
Usage
spsOption(opt, value = NULL, .list = NULL, empty_is_false = TRUE)
Arguments
opt |
string, length 1, what option you want to get or set |
value |
if this is not |
.list |
list, set many SPS options together at once by passing a list to this function. |
empty_is_false |
bool, when trying to get an option value, if the
option is |
Value
return the option value if value exists; return FALSE
if the value
is empty, like NULL
, NA
, ""
; return NULL
if empty_is_false = FALSE
;
see notFalsy
If value != NULL
will set the option to this new value, no returns.
Examples
spsOption("test1") # get a not existing option
spsOption("test1", 1) # set the value
spsOption("test1") # get the value again
spsOption("test2")
spsOption("test2", empty_is_false = FALSE)
spsOption(.list = list(
test1 = 123,
test2 = 456
))
spsOption("test1")
spsOption("test2")