Learn R Programming

assertive (version 0.1-7)

has_arg: Does the current call have an argument?

Description

Checks to see if the current call has an argument with the name given in the input.

Usage

has_arg(x)

Arguments

x
Input to check.

Value

  • has_arg wraps hasArg, providing more information on failure.

See Also

ncol.

Examples

Run this code
assert_has_rows(data.frame(x = 1:10))
assert_has_cols(matrix())

Run the code above in your browser using DataLab