*arg (development version)
Fixed bug in nested
arg_or()/arg_and()introduced in previous version. Such errors render much more cleanly.Nested errors are formatted more cleanly when used with
when_not_null()andwhen_supplied().
arg 0.2.0
CRAN release: 2026-07-15
Added
arg_color()(and variants) to check whether an argument corresponds to a valid color specification.Added
arg_name()andarg_names()to check whether an argument is a vector of valid names of elements of an object.Added
arg_ordered()to check whether an argument is an ordered factor.arg_index()andarg_indices()now check names for arbitrary objects, not just matrices and data frames.arg_counts()andarg_whole_numeric()(and their scalar equivalents) now check whether a value is a whole number usingrlang::is_integerish()instead of the criterion used byall.equal().Fixed a bug where the message provided to
.msg(if any) was not evaluated in the correct environment.Fixed several typos in the documentation and in some error messages.
Fixed bugs in processing some complicated nested messages produced by
arg_and()andarg_or().Added a new logo.
Added a testing suite.
arg 0.1.1
CRAN release: 2026-05-27
err(),wrn(), andmsg()now pass arguments specified in...torlang::abort(),rlang::warn(), andrlang::inform(), respectively.When an error is caused by a failure to process a given fixed argument (e.g.,
boundsinarg_gt()orleninarg_length()), that error is now thrown correctly inarg_or(),arg_and(),when_supplied(), andwhen_not_null(). Previously, it was bundled with the errors thrown to the ultimate user of the functionand_or(), etc., was used in, which it made it confusing to diagnose.Fixed bugs with
arg_or(),arg_and(),when_supplied(), andwhen_not_null().Fixed a bug where an extra period might be added after an error message.
When the empty string (
"") is supplied toerr(), etc., it is no longer appended with a period.Improved error messages for
arg_element()andarg_not_element().The
.msgargument ofarg_*()functions is now checked to ensure it is a string when notNULL.
