logger.argument {RnBeads} | R Documentation |
Reads a command-line argument supplied to a script.
logger.argument( arg.names, full.name, arg.type = "character", accepted.values = NULL, default = NULL, arg.list = commandArgs() )
arg.names |
|
full.name |
One-element |
arg.type |
Variable type of the argument. Must be one of |
accepted.values |
Vector of accepted values for the argument. This must be of the type given in |
default |
Default value for the argument in case it is not specified. Setting this to |
arg.list |
Vector of arguments provided at the execution of the script. The arguments should be provided as name=value pairs. |
This is convenience function for reading parameters supplied to the script in the form name = value.
It expects that logging is enabled (see rnb.options
). The function fails if this condition is
not met.
Argument's value, or NULL
if such is not provided.
Yassen Assenov
n.iterations <- logger.argument("iterations", "number of iterations", "integer", accepted.values = 1:100, default = 1L) logger.close()