View source: R/check_missing.R
check_missing | R Documentation |
These functions check whether a value was specified as an argument to a function.
check_missing(x)
assert_missing(x)
test_missing(x)
x |
[ |
Depending on the function prefix:
If the check is successful, assert_missing()
returns x
invisibly,
whereas check_missing()
and test_missing()
return TRUE
.
If the check is not successful, assert_missing()
throws an error message,
test_missing()
returns FALSE
, and check_missing()
returns a string with
the error message.
Other package helpers:
Dictionary
,
Storage
,
find_namespace_calls()
,
identical_structure()
,
input_check_response()
,
match_arg()
,
package_logo()
,
print_data.frame()
,
print_matrix()
,
system_information()
,
unexpected_error()
,
user_confirm()
f <- function(x) {
check_missing(x)
}
f()
g <- function(x) {
test_missing(x)
}
g()
h <- function(x) {
assert_missing(x)
}
## Not run:
h()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.