Description:
I would like to request the addition of the null.ok = TRUE parameter to the checkmate::check_names function. This feature would allow for more concise and elegant input validation when checking if an object is either a list or NULL, and if it is a list, ensuring that it has specific names.
Current Limitation:
Currently, for example, the checkmate::check_list function supports the null.ok parameter, allowing us to check if an object is either a list or NULL. However, the checkmate::check_names function does not support the null.ok parameter. This limitation makes it challenging to perform both checks in a single assert call.
Proposed Usage:
With the proposed feature, the code could be simplified as follows:
Description: I would like to request the addition of the
null.ok = TRUE
parameter to thecheckmate::check_names
function. This feature would allow for more concise and elegant input validation when checking if an object is either a list orNULL
, and if it is a list, ensuring that it has specific names.Current Limitation: Currently, for example, the
checkmate::check_list
function supports thenull.ok
parameter, allowing us to check if an object is either a list orNULL
. However, thecheckmate::check_names
function does not support thenull.ok
parameter. This limitation makes it challenging to perform both checks in a singleassert
call.Proposed Usage: With the proposed feature, the code could be simplified as follows:
Am I overlooking something, or what is your proposed usage? Thank you for considering this feature request.