View source: R/simpleCharArg.R
simpleCharArg | R Documentation |
Check that a variable is a single character string meeting specified requirements
simpleCharArg(name.arg, val.arg, default, accepted, lower = TRUE, clean = TRUE)
name.arg |
Name of the argument |
val.arg |
argument value |
default |
If val.arg is NULL, what should be returned? |
accepted |
What values are allowed |
lower |
run tolower? |
clean |
clean white spaces? |
Better options may be available in packages like checkmate. This function doesn't only check the parameter value, it also sets it to the default value if missing.
The resulting parameter value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.