Deprecated chk_() functions.
Usage
chk_dirs(x)
chk_files(x)
chk_has(x, values, x_name = NULL)
chk_in(x, values, x_name = NULL)
chk_no_missing(x, x_name = NULL)
vld_no_missing(x)
chk_off()
chk_on()
is_chk_on()
chk_proportion(x, x_name = NULL)
deparse_backtick(x)Value
The chk_ functions throw an informative error if the test fails and
otherwise return invisibly.
vld_no_missing() returns a flag indicating whether x has no missing
values and deparse_backtick() returns a string.
chk_off(), chk_on() and is_chk_on() are defunct and always throw an
error.
Functions
chk_dirs(): Check Directories ExistReplace with
[chk_all](x, [chk_dir])chk_files(): Check Files ExistReplace with
[chk_all](x, [chk_file])chk_has(): Check HasReplace by
chk_superset()chk_in(): Check InReplace by
chk_subset()chk_no_missing(): Check No Missing ValuesReplace with
chk_not_any_na()vld_no_missing(): Validate No Missing ValuesReplace with
vld_not_any_na()chk_off(): Turns checking offThis approach is no longer recommended
chk_on(): Turns checking onThis approach is no longer recommended
is_chk_on(): Tests checking onThis approach is no longer recommended
chk_proportion(): Check ProportionReplace by
[chk_number](x); [chk_range](x)deparse_backtick(): Deparse BacktickReplace with
deparse_backtick_chk()
See also
Other deprecated:
chk_chr(),
chk_dbl(),
chk_wnum()
Examples
# The deprecated functions signal a deprecation warning when called.
chk_has(1:2, 1)
#> Warning: `chk_has()` was deprecated in chk 0.2.0.
#> ℹ Please use `chk_superset()` instead.
chk_in(1, 1:2)
#> Warning: `chk_in()` was deprecated in chk 0.2.0.
#> ℹ Please use `chk_subset()` instead.
chk_no_missing(1)
#> Warning: `chk_no_missing()` was deprecated in chk 0.2.0.
#> ℹ Please use `chk_not_any_na()` instead.
vld_no_missing(1)
#> [1] TRUE
chk_proportion(0.5)
#> Warning: `chk_proportion()` was deprecated in chk 0.2.0.
#> ℹ Please use `chk_number(x)` or `chk_range(x)` instead
deparse_backtick(quote(x))
#> Warning: `deparse_backtick()` was deprecated in chk 0.2.0.
#> ℹ Please use `deparse_backtick_chk()` instead.
#> [1] "`x`"
# The defunct functions always throw an error.
try(chk_on())
#> Error : `chk_on()` was deprecated in chk 0.2.0 and is now defunct.
#> ℹ This approach is no longer recommended
