Changelog
Source:NEWS.md
arg (development version)
Added
arg_color()(and variants) to check whether an argument corresponds to a valid color specification.Fixed a bug where the message provided to
.msg(if any) was not evaluated in the correct environment.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().
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.