Description Usage Arguments Author(s) See Also Examples
Validates variables before further procedure execution.
1 |
test_var |
Multiple. The variable that is to be tested. |
type |
Character. The variable type determined by |
force |
numeric. Error message is sent as warning (1) or stop (2). |
size |
numeric. If |
def |
logical. Ignore this check if |
Benjamin Ziepert
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# Create variables
id <- 10
name <- "test"
time <- as.POSIXct("1986-08-31 02:15:00")
# Check variables
# e <- val_var(id, "character"); if (e != "") {stop(e)} # error and stop
# e <- val_var(name, "logical", FALSE); if (e != "") {stop(e)} # error and warning
e <- val_var(time, "POSIXct"); if (e != "") {stop(e)} # no error
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.