| SigBridgeR_Function_Setting | R Documentation |
These functions provide a centralized configuration system for the SigBridgeR package, allowing users to set and retrieve package-specific options with automatic naming conventions.
setFunOption sets one or more configuration options for the SigBridgeR package. Options are automatically prefixed with "SigBridgeR." if not already present, ensuring proper namespace isolation.
getFuncOption retrieves configuration options for the SigBridgeR package. The function automatically handles the "SigBridgeR." prefix, allowing users to reference options with or without the explicit prefix.
checkFuncOption validates configuration options for the SigBridgeR package. This function ensures that all options meet type and value requirements before they are set in the global options.
setFuncOption(...)
getFuncOption(option = NULL, default = NULL)
checkFuncOption(option, value, call = rlang::caller_env())
... |
Named arguments representing option-value pairs. Options can be provided with or without the "SigBridgeR." prefix. If the prefix is missing, it will be automatically added. |
option |
Character string specifying the option name to check |
default |
The default value to return if the option is not set. Defaults to NULL. |
value |
The proposed value to assign to the option |
call |
The execution environment of a currently running function |
This function performs the following validations:
Must be single logical values (TRUE/FALSE)
Must be single integer values
Must be a single positive integer value
The function is automatically called by setFuncOption to ensure all configuration options are valid before they are set.
Invisibly returns NULL. The function is called for its side effects of setting package options.
The value of the specified option if it exists, otherwise the provided default value.
No return value. The function throws an error if the value doesn't meet the required specifications for the given option.
verbose: A logical value indicating whether to print verbose messages, defaults to TRUE
timeout: An integer specifying the timeout in seconds for parallel processing, defaults to '180L“
seed: An integer specifying the random seed for reproducible results, defaults to '123L“
nthreads: An integer specifying the number of threads for parallel processing, defaults to '1L“
# Set options with automatic prefixing
setFuncOption(verbose = TRUE)
# Retrieve options with automatic prefixing
getFuncOption("verbose")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.