Learn R Programming

spsUtil (version 0.1.0)

spsOption: Get or set SPS options

Description

Get or set SPS options

Usage

spsOption(opt, value = 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

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 emptyIsFalse

If value != NULL will set the option to this new value, no returns.

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab