testargs | R Documentation |
testarg_num()
asserts that the argument is a numeric value.
Also rejects NaNs
and NAs
by default.
testarg_prop()
asserts that the argument value lies between 0
and 1.
testarg_pos()
asserts that the argument is positive.
testarg_not_this()
asserts that the argument is different
from one or several forbidden values.
testarg_char()
asserts that the argument is a character.
testarg_log()
asserts that the argument is a logical.
testarg_length()
asserts that the argument has the correct
length.
test_comrad_comm()
asserts the format of the supplied community
is standard.
testarg_num(arg, allow_nan = FALSE, allow_na = FALSE)
testarg_int(arg)
testarg_pos(arg)
testarg_prop(arg)
testarg_not_this(arg, forbidden)
testarg_char(arg)
testarg_log(arg)
testarg_length(arg, correct_length)
test_comrad_comm(comm)
test_comrad_tbl(comrad_tbl)
arg |
value of the asserted argument. |
allow_nan |
logical, should NaNs pass the test? |
allow_na |
logical, should NAs pass the test? |
forbidden |
a vector containing forbidden values. |
correct_length |
numeric, the length the argument should have. |
comm |
a tibble with one row per individual in the community and three columns:
|
comrad_tbl |
a tibble containing the output of a |
Currently testarg_not_this()
cannot be tested properly.
Theo Pannetier
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.