rba_options {rbioapi} | R Documentation |
Set rbioapi Global Options
Description
A safe way to change rbioapi's global options and behavior. see "arguments"
section for available options.
Note that you are not limited to changing the options globally, you can
include the option names and values in the '...' argument of any rbioapi
function to alter the option(s) only in that function call;
e.g. example_function(x, diagnostics = TRUE, timeout = 300).
Alternatively, you can call this function with no arguments, i.e.
rba_options(), to retrieve a data frame of available rbioapi options and
their current values.
Usage
rba_options(
diagnostics = NULL,
dir_name = NULL,
retry_max = NULL,
retry_wait = NULL,
progress = NULL,
save_file = NULL,
skip_error = NULL,
timeout = NULL,
verbose = NULL
)
Arguments
diagnostics |
(Logical) (default = FALSE) Show diagnostics and detailed messages with internal information. |
dir_name |
(character) (default = "rbioapi") If the package needs to generate a file path to save the server's response, a directory with this name will be created in your working directory to save your files. |
retry_max |
(Numeric) (default = 0) How many times should rbioapi retry in case of 5xx server responses, errors related to the server or no internet connectivity? |
retry_wait |
(Numeric) (default = 10) Time in seconds to wait before next retry in case of internet connection or server problems. |
progress |
(Logical) (default = FALSE) Should a progress bar be displayed? |
save_file |
(Logical or character) (default = FALSE) Either:
|
skip_error |
(Logical) (default = FALSE if R is in the interactive mode, TRUE otherwise) If TRUE, the code execution will not be stopped in case of errors (anything but HTTP status 200 from the server); Instead the error message will be returned as the function's output. However, if FALSE, in case of any error, the code execution will be halted and an error message will be issued. |
timeout |
(Numeric) (default = 30) The maximum time in seconds that you are willing to wait for a server response before giving up and stopping the function execution. |
verbose |
(Logical) (Default = TRUE) Generate short informative messages. |
Details
Because this function validates your supplied changes, please only change rbioapi options using this function and avoid directly editing them.
Value
If called without any argument, a Data frame with available options and their information; If Called with an argument, will Return NULL but Alters that option globally.
See Also
Other "Helper functions":
rba_connection_test()
,
rba_pages()
Examples
rba_options()
## Not run:
rba_options(verbose = FALSE)
## End(Not run)
## Not run:
rba_options(save_file = TRUE)
## End(Not run)
## Not run:
rba_options(diagnostics = TRUE, progress = TRUE)
## End(Not run)