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.

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 NULL, this function will set the option you choose to this value

.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 NULL, NA, "" or length is 0, return FALSE?

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
#> [1] FALSE
spsOption("test1", 1) # set the value
spsOption("test1") # get the value again
#> [1] 1
spsOption("test2")
#> [1] FALSE
spsOption("test2", empty_is_false = FALSE)
#> NULL
spsOption(.list = list(
    test1 = 123,
    test2 = 456
))
spsOption("test1")
#> [1] 123
spsOption("test2")
#> [1] 456